|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.diameter.packet.AvpFactory
public class AvpFactory
The AvpFactory class provides utility methods for generating commonly used AVPs. The AvpFactory
reduces the burden on the developer that is creating AVPs. Instead of creating an AVP using the
Avp
class, you create an AVP using this AvpFactory.
Note that you use this AvpFactory for creating RFC 3588 - Diameter Base Protocol AVPs. You use the com.ibm.diameter.charging.avp.ChargingAvpFactory when creating AVPs defined in RFC 4006 and ETSI TS 132 299 V6.9.0 (2006-12) - Diameter charging applications.
Example:Avp newOriginHostAvp = AvpFactory.createOriginHostAvp(originHostName);
Method Summary | |
---|---|
static Avp |
createAccountingRecordNumberAvp(int recordNumber)
Creates Accounting-Record-Number AVP |
static Avp |
createAccountingRecordNumberAvp(int recordNumber,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createAccountingRecordTypeAvp(int recordType)
Creates Accounting-Record-Type AVP |
static Avp |
createAccountingRecordTypeAvp(int recordType,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createAcctApplicationIdAvp(int acctApplicationId)
Creates Acct-ApplicationId AVP |
static Avp |
createAcctApplicationIdAvp(int acctApplicationId,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createAcctInterimIntervalAvp(int acctInterimInterval)
Creates Acct-Interim-Interval AVP |
static Avp |
createAcctInterimIntervalAvp(int acctInterimInterval,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createAuthApplicationIdAvp(int authApplicationId)
Creates Auth-ApplicationId AVP |
static Avp |
createAuthApplicationIdAvp(int authApplicationId,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createDestinationHostAvp(java.lang.String destinationHost)
Creates Destination-Host AVP |
static Avp |
createDestinationHostAvp(java.lang.String destinationHost,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createDestinationRealmAvp(java.lang.String destinationRealm)
Creates Destination-Realm AVP |
static Avp |
createDestinationRealmAvp(java.lang.String destinationRealm,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createErrorMessageAvp(java.lang.String errorMessage)
Creates an Error-Message AVP |
static Avp |
createErrorMessageAvp(java.lang.String errorMessage,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createErrorReportingHostAvp(java.lang.String errorReportingHost)
Creates Error-Reporting-Host AVP |
static Avp |
createErrorReportingHostAvp(java.lang.String errorReportingHost,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createEventTimestampAvp(long eventTimestamp)
Creates Event-Timestamp AVP. |
static Avp |
createEventTimestampAvp(long eventTimestamp,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createFailedAvpAvp(java.util.Vector failedAvp)
Creates Failed AVP AVP |
static Avp |
createFailedAvpAvp(java.util.Vector failedAvp,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createFirmwareRevisionAvp(int firmwareRevision)
Creates Firmware-Revision AVP |
static Avp |
createFirmwareRevisionAvp(int firmwareRevision,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createHostIpAddressAvp(java.net.InetSocketAddress inetSocketAddress)
Creates a Host-IP-Address AVP |
static Avp |
createHostIpAddressAvp(java.net.InetSocketAddress inetSocketAddress,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createInbandSecurityIdAvp(int inbandSecurityId)
Creates Inband-Security-Id AVP. |
static Avp |
createInbandSecurityIdAvp(int inbandSecurityId,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createOriginHostAvp(java.lang.String originHostName)
Creates an Origin-Host AVP |
static Avp |
createOriginHostAvp(java.lang.String originHostName,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createOriginRealmAvp(java.lang.String originRealmName)
Creates an Origin-Realm AVP |
static Avp |
createOriginRealmAvp(java.lang.String originRealmName,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createOriginStateIdAvp(int originStateId)
Creates an Origin-State-Id AVP |
static Avp |
createOriginStateIdAvp(int originStateId,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createProductNameAvp(java.lang.String productName)
Creates a Product-Name AVP |
static Avp |
createProductNameAvp(java.lang.String productName,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createProxyHostAvp(java.lang.String proxyHost)
Creates Proxy-Host AVP |
static Avp |
createProxyHostAvp(java.lang.String proxyHost,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createProxyInfoAvp(java.util.Vector avps)
Creates Proxy-Info AVP |
static Avp |
createProxyInfoAvp(java.util.Vector avps,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createProxyStateAvp(byte[] proxyState)
Creates Proxy-State AVP |
static Avp |
createProxyStateAvp(byte[] proxyState,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createReAuthRequestTypeAvp(int reAuthRequestType)
Creates Re-Auth-Request-Type AVP |
static Avp |
createReAuthRequestTypeAvp(int reAuthRequestType,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createRedirectHostAvp(java.lang.String redirectHost)
Creates Redirect-Host AVP |
static Avp |
createRedirectHostAvp(java.lang.String redirectHost,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createRedirectHostUsageAvp(int redirectHostUsage)
Creates Redirect-Host-Usage AVP |
static Avp |
createRedirectHostUsageAvp(int redirectHostUsage,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createRedirectMaxCacheTimeAvp(int redirectMaxCacheTime)
Creates Redirect-Max-Cache-Time AVP |
static Avp |
createRedirectMaxCacheTimeAvp(int redirectMaxCacheTime,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createResultCodeAvp(int resultCode)
Creates a Result-Code AVP |
static Avp |
createResultCodeAvp(int resultCode,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createRouteRecordAvp(java.lang.String routeRecord)
Creates Route-Record AVP |
static Avp |
createRouteRecordAvp(java.lang.String routeRecord,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createSessionIdAvp(java.lang.String sessionId)
Creates Session-Id AVP |
static Avp |
createSessionIdAvp(java.lang.String sessionId,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createSupportedVendorIdAvp(int supportedVendorId)
Creates Supported Vendor AVP |
static Avp |
createSupportedVendorIdAvp(int supportedVendorId,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createTerminationCauseAvp(int terminationCause)
Creates Termination-Cause AVP |
static Avp |
createTerminationCauseAvp(int terminationCause,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createUserNameAvp(java.lang.String userName)
Creates User-Name AVP |
static Avp |
createUserNameAvp(java.lang.String userName,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
static Avp |
createVendorIdAvp(int vendorId)
Creates a Vendor-Id AVP |
static Avp |
createVendorIdAvp(int vendorId,
byte avpFlags)
Deprecated. as of release 6.2 to remove avpFlags parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Avp createAccountingRecordNumberAvp(int recordNumber)
recordNumber
- int containing the value of the Accounting-Record-Number.
public static Avp createAccountingRecordNumberAvp(int recordNumber, byte avpFlags)
recordNumber
- int containing the value of the Accounting-Record-Number.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createAccountingRecordTypeAvp(int recordType)
recordType
- int containing the value of the Accounting-Record-Type.
public static Avp createAccountingRecordTypeAvp(int recordType, byte avpFlags)
recordType
- int containing the value of the Accounting-Record-Type.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createAcctApplicationIdAvp(int acctApplicationId)
acctApplicationId
- int containing the value of the Acct-Application-Id.
public static Avp createAcctApplicationIdAvp(int acctApplicationId, byte avpFlags)
acctApplicationId
- int containing the value of the Acct-Application-Id.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createAcctInterimIntervalAvp(int acctInterimInterval)
acctInterimInterval
- int containing the value of the Acct-Interim-Interval.
public static Avp createAcctInterimIntervalAvp(int acctInterimInterval, byte avpFlags)
acctInterimInterval
- int containing the value of the Acct-Interim-Interval.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createAuthApplicationIdAvp(int authApplicationId)
authApplicationId
- int containing the value of the Auth-Application-Id.
public static Avp createAuthApplicationIdAvp(int authApplicationId, byte avpFlags)
authApplicationId
- int containing the value of the Auth-Application-Id.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createDestinationHostAvp(java.lang.String destinationHost)
destinationHost
- String containing the value of the Destination-Host.
public static Avp createDestinationHostAvp(java.lang.String destinationHost, byte avpFlags)
destinationHost
- String containing the value of the Destination-Host.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createDestinationRealmAvp(java.lang.String destinationRealm)
destinationRealm
- String containing the value of the Destination-Host.
public static Avp createDestinationRealmAvp(java.lang.String destinationRealm, byte avpFlags)
destinationRealm
- String containing the value of the Destination-Host.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createErrorMessageAvp(java.lang.String errorMessage)
errorMessage
- String containing the text Error Message to be used in the AVP.
public static Avp createErrorMessageAvp(java.lang.String errorMessage, byte avpFlags)
errorMessage
- String containing the text Error Message to be used in the AVP.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createErrorReportingHostAvp(java.lang.String errorReportingHost)
errorReportingHost
- String containing the value of the Error-Reporting-Host.
public static Avp createErrorReportingHostAvp(java.lang.String errorReportingHost, byte avpFlags)
errorReportingHost
- String containing the value of the Error-Reporting-Host.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createEventTimestampAvp(long eventTimestamp)
Avp newEventTimestampAvp = AvpFactory.createEventTimestampAvp(System.currentTimeMillis());
eventTimestamp
- long containing the value of the Event-Timestamp in milliseconds from
January 1, 1970, 0:0:0.
public static Avp createEventTimestampAvp(long eventTimestamp, byte avpFlags)
eventTimestamp
- int containing the value of the Event-Timestamp.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createFailedAvpAvp(java.util.Vector failedAvp)
failedAvp
- Vector of one or more failing AVPs. Note that the RFC is ambiguous.
It is expected
that most will only have a single AVP.
public static Avp createFailedAvpAvp(java.util.Vector failedAvp, byte avpFlags)
failedAvp
- Vector of one or more failing AVPs. Note that the RFC is ambiguous.
It is expected
that most will only have a single AVP.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit.
Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createFirmwareRevisionAvp(int firmwareRevision)
firmwareRevision
- int containing the revision level of this software implementation.
public static Avp createFirmwareRevisionAvp(int firmwareRevision, byte avpFlags)
firmwareRevision
- int containing the revision level of this software implementation.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createHostIpAddressAvp(java.net.InetSocketAddress inetSocketAddress)
inetSocketAddress
- containing one of the network interface addresses of this host
public static Avp createHostIpAddressAvp(java.net.InetSocketAddress inetSocketAddress, byte avpFlags)
inetSocketAddress
- containing one of the network interface addresses of this hostavpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createInbandSecurityIdAvp(int inbandSecurityId)
inbandSecurityId
- int containing the value of the Inband-Security-Id. 0 = No Inband Security
1 = TLS Required
public static Avp createInbandSecurityIdAvp(int inbandSecurityId, byte avpFlags)
inbandSecurityId
- int containing the value of the Inband-Security-Id. 0 = No Inband Security
1 = TLS RequiredavpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createOriginHostAvp(java.lang.String originHostName)
originHostName
- String containing the Fully Qualified Domain Name (FQDN) of the host.
public static Avp createOriginHostAvp(java.lang.String originHostName, byte avpFlags)
originHostName
- String containing the Fully Qualified Domain Name (FQDN) of the hostavpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createOriginRealmAvp(java.lang.String originRealmName)
originRealmName
- String containing the Fully Qualified Domain Name (FQDN) of the realm
public static Avp createOriginRealmAvp(java.lang.String originRealmName, byte avpFlags)
originRealmName
- String containing the Fully Qualified Domain Name (FQDN) of the realmavpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createOriginStateIdAvp(int originStateId)
originStateId
- int Origin-State-Id value to be used in the AVP. Note that this is obtained
from the OriginStateIdFactory which implements the algorithm for creating an OriginStateId.
public static Avp createOriginStateIdAvp(int originStateId, byte avpFlags)
originStateId
- int Origin-State-Id value to be used in the AVP. Note that this is obtained
from the OriginStateIdFactory which implements the algorithm for creating an OriginStateId.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createProductNameAvp(java.lang.String productName)
productName
- String containing the product name of the Diameter Implementation
public static Avp createProductNameAvp(java.lang.String productName, byte avpFlags)
productName
- String containing the product name of the Diameter ImplementationavpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createProxyHostAvp(java.lang.String proxyHost)
proxyHost
- int containing the value of the Proxy-Host.
public static Avp createProxyHostAvp(java.lang.String proxyHost, byte avpFlags)
proxyHost
- int containing the value of the Proxy-Host.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createProxyInfoAvp(java.util.Vector avps)
avps
- Vector of AVPs containing the value of the Proxy-Info.
public static Avp createProxyInfoAvp(java.util.Vector avps, byte avpFlags)
avps
- Vector of AVPs containing the value of the Proxy-Info.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createProxyStateAvp(byte[] proxyState)
proxyState
- byte array containing the value of the Proxy-State.
public static Avp createProxyStateAvp(byte[] proxyState, byte avpFlags)
proxyState
- byte array containing the value of the Proxy-State.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createReAuthRequestTypeAvp(int reAuthRequestType)
reAuthRequestType
- int containing the value of the Re-Auth-Request-Type.
public static Avp createReAuthRequestTypeAvp(int reAuthRequestType, byte avpFlags)
reAuthRequestType
- int containing the value of the Re-Auth-Request-Type.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createRedirectHostAvp(java.lang.String redirectHost)
redirectHost
- String containing the value of the Redirect-Host.
public static Avp createRedirectHostAvp(java.lang.String redirectHost, byte avpFlags)
redirectHost
- String containing the value of the Redirect-Host.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createRedirectHostUsageAvp(int redirectHostUsage)
redirectHostUsage
- int containing the value of the Redirect-Host-Usage.
public static Avp createRedirectHostUsageAvp(int redirectHostUsage, byte avpFlags)
redirectHostUsage
- int containing the value of the Redirect-Host-Usage.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createRedirectMaxCacheTimeAvp(int redirectMaxCacheTime)
redirectMaxCacheTime
- int containing the value of the Redirect-Max-Cache-Time.
public static Avp createRedirectMaxCacheTimeAvp(int redirectMaxCacheTime, byte avpFlags)
redirectMaxCacheTime
- int containing the value of the Redirect-Max-Cache-Time.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createResultCodeAvp(int resultCode)
resultCode
- int containing the result code to be used in the AVP
public static Avp createResultCodeAvp(int resultCode, byte avpFlags)
resultCode
- int containing the result code to be used in the AVPavpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createRouteRecordAvp(java.lang.String routeRecord)
routeRecord
- String containing the value of the Route-Record.
public static Avp createRouteRecordAvp(java.lang.String routeRecord, byte avpFlags)
routeRecord
- String containing the value of the Route-Record.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createSessionIdAvp(java.lang.String sessionId)
sessionId
- String containing the value of the Session-Id.
public static Avp createSessionIdAvp(java.lang.String sessionId, byte avpFlags)
sessionId
- String containing the value of the Session-Id.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createSupportedVendorIdAvp(int supportedVendorId)
supportedVendorId
- int containing the Vendor ID value for insertion into the AVP.
public static Avp createSupportedVendorIdAvp(int supportedVendorId, byte avpFlags)
supportedVendorId
- int containing the Vendor ID value for insertion into the AVP.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createTerminationCauseAvp(int terminationCause)
terminationCause
- int containing the value of the Termination-Cause.
public static Avp createTerminationCauseAvp(int terminationCause, byte avpFlags)
terminationCause
- int containing the value of the Termination-Cause.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createUserNameAvp(java.lang.String userName)
userName
- String containing the value of the User-Name.
public static Avp createUserNameAvp(java.lang.String userName, byte avpFlags)
userName
- String containing the value of the User-Name.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
public static Avp createVendorIdAvp(int vendorId)
vendorId
- int containing the IANA vendor ID code to be used in the AVP.
public static Avp createVendorIdAvp(int vendorId, byte avpFlags)
vendorId
- int containing the IANA vendor ID code to be used in the AVP.avpFlags
- byte containing the V-bit, the M-bit, and the P-bit. Should use the Avp constants
(e.g. Avp.VOFF_MON_POFF)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |