Interface CapabilitiesExchangeRequest
-
- All Superinterfaces:
Cloneable
,DiameterMessage
public interface CapabilitiesExchangeRequest extends DiameterMessage
Defines an interface representing the Capabilities-Exchange-Request command. From the Diameter Base Protocol (rfc6733.txt) specification:5.3.1. Capabilities-Exchange-Request The Capabilities-Exchange-Request (CER), indicated by the Command Code set to 257 and the Command Flags' 'R' bit set, is sent to exchange local capabilities. Upon detection of a transport failure, this message MUST NOT be sent to an alternate peer. When Diameter is run over SCTP [RFC4960] or DTLS/SCTP [RFC6083], which allow for connections to span multiple interfaces and multiple IP addresses, the Capabilities-Exchange-Request message MUST contain one Host-IP-Address AVP for each potential IP address that MAY be locally used when transmitting Diameter messages. Message Format <Capabilities-Exchange-Request> ::= < Diameter Header: 257, REQ > { Origin-Host } { Origin-Realm } 1* { Host-IP-Address } { Vendor-Id } { Product-Name } [ Origin-State-Id ] * [ Supported-Vendor-Id ] * [ Auth-Application-Id ] * [ Inband-Security-Id ] * [ Acct-Application-Id ] * [ Vendor-Specific-Application-Id ] [ Firmware-Revision ] * [ AVP ]
-
-
Field Summary
Fields Modifier and Type Field Description static int
commandCode
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long[]
getAcctApplicationIds()
Returns the set of Acct-Application-Id AVPs.long[]
getAuthApplicationIds()
Returns the set of Auth-Application-Id AVPs.DiameterAvp[]
getExtensionAvps()
Returns the set of extension AVPs.long
getFirmwareRevision()
Returns the value of the Firmware-Revision AVP, of type Unsigned32.Address[]
getHostIpAddresses()
Returns the set of Host-IP-Address AVPs.long[]
getInbandSecurityIds()
Returns the set of Inband-Security-Id AVPs.DiameterIdentity
getOriginHost()
Returns the value of the Origin-Host AVP, of type DiameterIdentity.DiameterIdentity
getOriginRealm()
Returns the value of the Origin-Realm AVP, of type DiameterIdentity.long
getOriginStateId()
Returns the value of the Origin-State-Id AVP, of type Unsigned32.String
getProductName()
Returns the value of the Product-Name AVP, of type UTF8String.long[]
getSupportedVendorIds()
Returns the set of Supported-Vendor-Id AVPs.long
getVendorId()
Returns the value of the Vendor-Id AVP, of type Unsigned32.VendorSpecificApplicationId[]
getVendorSpecificApplicationIds()
Returns the set of Vendor-Specific-Application-Id AVPs.boolean
hasFirmwareRevision()
Returns true if the Firmware-Revision AVP is present in the message.boolean
hasOriginHost()
Returns true if the Origin-Host AVP is present in the message.boolean
hasOriginRealm()
Returns true if the Origin-Realm AVP is present in the message.boolean
hasOriginStateId()
Returns true if the Origin-State-Id AVP is present in the message.boolean
hasProductName()
Returns true if the Product-Name AVP is present in the message.boolean
hasVendorId()
Returns true if the Vendor-Id AVP is present in the message.void
removeAcctApplicationIds()
Removes all Acct-Application-Id AVPs from the message.void
removeAuthApplicationIds()
Removes all Auth-Application-Id AVPs from the message.void
removeExtensionAvps()
Removes all extension AVPs from the message.void
removeFirmwareRevision()
Removes the Firmware-Revision AVP from the message.void
removeHostIpAddresses()
Removes all Host-IP-Address AVPs from the message.void
removeInbandSecurityIds()
Removes all Inband-Security-Id AVPs from the message.void
removeOriginHost()
Removes the Origin-Host AVP from the message.void
removeOriginRealm()
Removes the Origin-Realm AVP from the message.void
removeOriginStateId()
Removes the Origin-State-Id AVP from the message.void
removeProductName()
Removes the Product-Name AVP from the message.void
removeSupportedVendorIds()
Removes all Supported-Vendor-Id AVPs from the message.void
removeVendorId()
Removes the Vendor-Id AVP from the message.void
removeVendorSpecificApplicationIds()
Removes all Vendor-Specific-Application-Id AVPs from the message.void
setAcctApplicationId(long acctApplicationId)
Sets a single Acct-Application-Id AVP in the message, of type Unsigned32.void
setAcctApplicationIds(long[] acctApplicationIds)
Sets the set of Acct-Application-Id AVPs, with all the values in the given array.void
setAuthApplicationId(long authApplicationId)
Sets a single Auth-Application-Id AVP in the message, of type Unsigned32.void
setAuthApplicationIds(long[] authApplicationIds)
Sets the set of Auth-Application-Id AVPs, with all the values in the given array.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.void
setFirmwareRevision(long firmwareRevision)
Sets the value of the Firmware-Revision AVP, of type Unsigned32.void
setHostIpAddress(Address hostIpAddress)
Sets a single Host-IP-Address AVP in the message, of type Address.void
setHostIpAddresses(Address[] hostIpAddresses)
Sets the set of Host-IP-Address AVPs, with all the values in the given array.void
setInbandSecurityId(long inbandSecurityId)
Sets a single Inband-Security-Id AVP in the message, of type Unsigned32.void
setInbandSecurityIds(long[] inbandSecurityIds)
Sets the set of Inband-Security-Id AVPs, with all the values in the given array.void
setOriginHost(DiameterIdentity originHost)
Sets the value of the Origin-Host AVP, of type DiameterIdentity.void
setOriginRealm(DiameterIdentity originRealm)
Sets the value of the Origin-Realm AVP, of type DiameterIdentity.void
setOriginStateId(long originStateId)
Sets the value of the Origin-State-Id AVP, of type Unsigned32.void
setProductName(String productName)
Sets the value of the Product-Name AVP, of type UTF8String.void
setSupportedVendorId(long supportedVendorId)
Sets a single Supported-Vendor-Id AVP in the message, of type Unsigned32.void
setSupportedVendorIds(long[] supportedVendorIds)
Sets the set of Supported-Vendor-Id AVPs, with all the values in the given array.void
setVendorId(long vendorId)
Sets the value of the Vendor-Id AVP, of type Unsigned32.void
setVendorSpecificApplicationId(VendorSpecificApplicationId vendorSpecificApplicationId)
Sets a single Vendor-Specific-Application-Id AVP in the message, of type Grouped.void
setVendorSpecificApplicationIds(VendorSpecificApplicationId[] vendorSpecificApplicationIds)
Sets the set of Vendor-Specific-Application-Id AVPs, with all the values in the given array.-
Methods inherited from interface org.jainslee.resources.diameter.base.DiameterMessage
clone, getAvps, getCommand, getDestinationHost, getDestinationRealm, getHeader, getSessionId, setDestinationHost, setDestinationRealm, setSessionId
-
-
-
-
Field Detail
-
commandCode
static final int commandCode
- See Also:
- Constant Field Values
-
-
Method Detail
-
hasOriginHost
boolean hasOriginHost()
Returns true if the Origin-Host AVP is present in the message.
-
getOriginHost
DiameterIdentity getOriginHost()
Returns the value of the Origin-Host AVP, of type DiameterIdentity.- Specified by:
getOriginHost
in interfaceDiameterMessage
- Returns:
- the value of the Origin-Host AVP or null if it has not been set on this message
-
setOriginHost
void setOriginHost(DiameterIdentity originHost)
Sets the value of the Origin-Host AVP, of type DiameterIdentity.- Specified by:
setOriginHost
in interfaceDiameterMessage
- Throws:
NullPointerException
- iforiginHost
isnull
.
-
removeOriginHost
void removeOriginHost()
Removes the Origin-Host AVP from the message. If the Origin-Host AVP is not present, this method returns silently.
-
hasOriginRealm
boolean hasOriginRealm()
Returns true if the Origin-Realm AVP is present in the message.
-
getOriginRealm
DiameterIdentity getOriginRealm()
Returns the value of the Origin-Realm AVP, of type DiameterIdentity.- Specified by:
getOriginRealm
in interfaceDiameterMessage
- Returns:
- the value of the Origin-Realm AVP or null if it has not been set on this message
-
setOriginRealm
void setOriginRealm(DiameterIdentity originRealm)
Sets the value of the Origin-Realm AVP, of type DiameterIdentity.- Specified by:
setOriginRealm
in interfaceDiameterMessage
- Throws:
NullPointerException
- iforiginRealm
isnull
.
-
removeOriginRealm
void removeOriginRealm()
Removes the Origin-Realm AVP from the message. If the Origin-Realm AVP is not present, this method returns silently.
-
getHostIpAddresses
Address[] getHostIpAddresses()
Returns the set of Host-IP-Address AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Host-IP-Address AVPs have been set. The elements in the given array are Address objects.
-
setHostIpAddress
void setHostIpAddress(Address hostIpAddress)
Sets a single Host-IP-Address AVP in the message, of type Address.- Throws:
NullPointerException
- ifhostIpAddress
isnull
.
-
setHostIpAddresses
void setHostIpAddresses(Address[] hostIpAddresses)
Sets the set of Host-IP-Address AVPs, with all the values in the given array. The AVPs will be added to message in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getHostIpAddresses() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException
- ifhostIpAddresses
isnull
.
-
removeHostIpAddresses
void removeHostIpAddresses()
Removes all Host-IP-Address AVPs from the message. If no Host-IP-Address AVPs are present, this method returns silently.
-
hasVendorId
boolean hasVendorId()
Returns true if the Vendor-Id AVP is present in the message.
-
getVendorId
long getVendorId()
Returns the value of the Vendor-Id AVP, of type Unsigned32. UsehasVendorId()
to check the existence of this AVP.- Returns:
- the value of the Vendor-Id AVP
- Throws:
IllegalStateException
- if the Vendor-Id AVP has not been set on this message
-
setVendorId
void setVendorId(long vendorId)
Sets the value of the Vendor-Id AVP, of type Unsigned32.
-
removeVendorId
void removeVendorId()
Removes the Vendor-Id AVP from the message. If the Vendor-Id AVP is not present, this method returns silently.
-
hasProductName
boolean hasProductName()
Returns true if the Product-Name AVP is present in the message.
-
getProductName
String getProductName()
Returns the value of the Product-Name AVP, of type UTF8String.- Returns:
- the value of the Product-Name AVP or null if it has not been set on this message
-
setProductName
void setProductName(String productName)
Sets the value of the Product-Name AVP, of type UTF8String.- Throws:
NullPointerException
- ifproductName
isnull
.
-
removeProductName
void removeProductName()
Removes the Product-Name AVP from the message. If the Product-Name AVP is not present, this method returns silently.
-
hasOriginStateId
boolean hasOriginStateId()
Returns true if the Origin-State-Id AVP is present in the message.
-
getOriginStateId
long getOriginStateId()
Returns the value of the Origin-State-Id AVP, of type Unsigned32. UsehasOriginStateId()
to check the existence of this AVP.- Returns:
- the value of the Origin-State-Id AVP
- Throws:
IllegalStateException
- if the Origin-State-Id AVP has not been set on this message
-
setOriginStateId
void setOriginStateId(long originStateId)
Sets the value of the Origin-State-Id AVP, of type Unsigned32.
-
removeOriginStateId
void removeOriginStateId()
Removes the Origin-State-Id AVP from the message. If the Origin-State-Id AVP is not present, this method returns silently.
-
getSupportedVendorIds
long[] getSupportedVendorIds()
Returns the set of Supported-Vendor-Id AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Supported-Vendor-Id AVPs have been set. The elements in the given array are long objects.
-
setSupportedVendorId
void setSupportedVendorId(long supportedVendorId)
Sets a single Supported-Vendor-Id AVP in the message, of type Unsigned32.
-
setSupportedVendorIds
void setSupportedVendorIds(long[] supportedVendorIds)
Sets the set of Supported-Vendor-Id AVPs, with all the values in the given array. The AVPs will be added to message in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getSupportedVendorIds() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException
- ifsupportedVendorIds
isnull
.
-
removeSupportedVendorIds
void removeSupportedVendorIds()
Removes all Supported-Vendor-Id AVPs from the message. If no Supported-Vendor-Id AVPs are present, this method returns silently.
-
getAuthApplicationIds
long[] getAuthApplicationIds()
Returns the set of Auth-Application-Id AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Auth-Application-Id AVPs have been set. The elements in the given array are long objects.
-
setAuthApplicationId
void setAuthApplicationId(long authApplicationId)
Sets a single Auth-Application-Id AVP in the message, of type Unsigned32.
-
setAuthApplicationIds
void setAuthApplicationIds(long[] authApplicationIds)
Sets the set of Auth-Application-Id AVPs, with all the values in the given array. The AVPs will be added to message in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getAuthApplicationIds() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException
- ifauthApplicationIds
isnull
.
-
removeAuthApplicationIds
void removeAuthApplicationIds()
Removes all Auth-Application-Id AVPs from the message. If no Auth-Application-Id AVPs are present, this method returns silently.
-
getInbandSecurityIds
long[] getInbandSecurityIds()
Returns the set of Inband-Security-Id AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Inband-Security-Id AVPs have been set. The elements in the given array are long objects.
-
setInbandSecurityId
void setInbandSecurityId(long inbandSecurityId)
Sets a single Inband-Security-Id AVP in the message, of type Unsigned32.
-
setInbandSecurityIds
void setInbandSecurityIds(long[] inbandSecurityIds)
Sets the set of Inband-Security-Id AVPs, with all the values in the given array. The AVPs will be added to message in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getInbandSecurityIds() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException
- ifinbandSecurityIds
isnull
.
-
removeInbandSecurityIds
void removeInbandSecurityIds()
Removes all Inband-Security-Id AVPs from the message. If no Inband-Security-Id AVPs are present, this method returns silently.
-
getAcctApplicationIds
long[] getAcctApplicationIds()
Returns the set of Acct-Application-Id AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Acct-Application-Id AVPs have been set. The elements in the given array are long objects.
-
setAcctApplicationId
void setAcctApplicationId(long acctApplicationId)
Sets a single Acct-Application-Id AVP in the message, of type Unsigned32.
-
setAcctApplicationIds
void setAcctApplicationIds(long[] acctApplicationIds)
Sets the set of Acct-Application-Id AVPs, with all the values in the given array. The AVPs will be added to message in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getAcctApplicationIds() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException
- ifacctApplicationIds
isnull
.
-
removeAcctApplicationIds
void removeAcctApplicationIds()
Removes all Acct-Application-Id AVPs from the message. If no Acct-Application-Id AVPs are present, this method returns silently.
-
getVendorSpecificApplicationIds
VendorSpecificApplicationId[] getVendorSpecificApplicationIds()
Returns the set of Vendor-Specific-Application-Id AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Vendor-Specific-Application-Id AVPs have been set. The elements in the given array are VendorSpecificApplicationId objects.
-
setVendorSpecificApplicationId
void setVendorSpecificApplicationId(VendorSpecificApplicationId vendorSpecificApplicationId)
Sets a single Vendor-Specific-Application-Id AVP in the message, of type Grouped.- Throws:
NullPointerException
- ifvendorSpecificApplicationId
isnull
.
-
setVendorSpecificApplicationIds
void setVendorSpecificApplicationIds(VendorSpecificApplicationId[] vendorSpecificApplicationIds)
Sets the set of Vendor-Specific-Application-Id AVPs, with all the values in the given array. The AVPs will be added to message in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getVendorSpecificApplicationIds() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException
- ifvendorSpecificApplicationIds
isnull
.
-
removeVendorSpecificApplicationIds
void removeVendorSpecificApplicationIds()
Removes all Vendor-Specific-Application-Id AVPs from the message. If no Vendor-Specific-Application-Id AVPs are present, this method returns silently.
-
hasFirmwareRevision
boolean hasFirmwareRevision()
Returns true if the Firmware-Revision AVP is present in the message.
-
getFirmwareRevision
long getFirmwareRevision()
Returns the value of the Firmware-Revision AVP, of type Unsigned32. UsehasFirmwareRevision()
to check the existence of this AVP.- Returns:
- the value of the Firmware-Revision AVP
- Throws:
IllegalStateException
- if the Firmware-Revision AVP has not been set on this message
-
setFirmwareRevision
void setFirmwareRevision(long firmwareRevision)
Sets the value of the Firmware-Revision AVP, of type Unsigned32.
-
removeFirmwareRevision
void removeFirmwareRevision()
Removes the Firmware-Revision AVP from the message. If the Firmware-Revision AVP is not present, this method returns silently.
-
getExtensionAvps
DiameterAvp[] getExtensionAvps()
Returns the set of extension AVPs. The returned array contains the extension AVPs in the order they appear in the message. A return value of null implies that no extensions AVPs have been set.
-
setExtensionAvps
void setExtensionAvps(DiameterAvp[] avps) throws AvpNotAllowedException
Sets the set of extension AVPs with all the values in the given array. The AVPs will be added to message in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getExtensionAvps() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
AvpNotAllowedException
- if an AVP is encountered of a type already known to this class (i.e. an AVP for which get/set methods already appear in this class)NullPointerException
- ifavps
isnull
.
-
removeExtensionAvps
void removeExtensionAvps()
Removes all extension AVPs from the message. If no extension AVPs are present, this method returns silently.
-
-