Interface ExtensionDiameterMessage
-
- All Superinterfaces:
Cloneable,DiameterMessage
public interface ExtensionDiameterMessage extends DiameterMessage
Defines an interface representing the Extension-Diameter-Message command.An implementation of DiameterMessage for extension messages--those not defined by the Diameter RA being used. It follows the same pattern as the standard message types, but with the DiameterCommand supplied by the user. The AVPs are exposed as the set of 'extension AVP's', the same way as exposed for messages which define a "* [ AVP ]" line in the BNF definition of the message. Message Format <Extension-Diameter-Message> ::= < Diameter Header: 0, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Host } { Destination-Realm } * [ AVP ]
-
-
Field Summary
Fields Modifier and Type Field Description static intcommandCode
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DiameterIdentitygetDestinationHost()Returns the value of the Destination-Host AVP, of type DiameterIdentity.DiameterIdentitygetDestinationRealm()Returns the value of the Destination-Realm AVP, of type DiameterIdentity.DiameterAvp[]getExtensionAvps()Returns the set of extension AVPs.DiameterIdentitygetOriginHost()Returns the value of the Origin-Host AVP, of type DiameterIdentity.DiameterIdentitygetOriginRealm()Returns the value of the Origin-Realm AVP, of type DiameterIdentity.StringgetSessionId()Returns the value of the Session-Id AVP, of type UTF8String.booleanhasSessionId()Returns true if the Session-Id AVP is present in the message.voidremoveExtensionAvps()Removes all extension AVPs from the message.voidsetDestinationHost(DiameterIdentity destinationHost)Sets the value of the Destination-Host AVP, of type DiameterIdentity.voidsetDestinationRealm(DiameterIdentity destinationRealm)Sets the value of the Destination-Realm AVP, of type DiameterIdentity.voidsetExtensionAvps(DiameterAvp[] avps)Sets the set of extension AVPs with all the values in the given array.voidsetOriginHost(DiameterIdentity originHost)Sets the value of the Origin-Host AVP, of type DiameterIdentity.voidsetOriginRealm(DiameterIdentity originRealm)Sets the value of the Origin-Realm AVP, of type DiameterIdentity.voidsetSessionId(String sessionId)Sets the value of the Session-Id AVP, of type UTF8String.-
Methods inherited from interface org.jainslee.resources.diameter.base.DiameterMessage
clone, getAvps, getCommand, getHeader
-
-
-
-
Field Detail
-
commandCode
static final int commandCode
- See Also:
- Constant Field Values
-
-
Method Detail
-
hasSessionId
boolean hasSessionId()
Returns true if the Session-Id AVP is present in the message.
-
getSessionId
String getSessionId()
Returns the value of the Session-Id AVP, of type UTF8String. A return value of null implies that the AVP has not been set.- Specified by:
getSessionIdin interfaceDiameterMessage
-
setSessionId
void setSessionId(String sessionId)
Sets the value of the Session-Id AVP, of type UTF8String.- Specified by:
setSessionIdin interfaceDiameterMessage- Throws:
NullPointerException- ifsessionIdisnull.
-
getOriginHost
DiameterIdentity getOriginHost()
Returns the value of the Origin-Host AVP, of type DiameterIdentity. A return value of null implies that the AVP has not been set.- Specified by:
getOriginHostin interfaceDiameterMessage
-
setOriginHost
void setOriginHost(DiameterIdentity originHost)
Sets the value of the Origin-Host AVP, of type DiameterIdentity.- Specified by:
setOriginHostin interfaceDiameterMessage- Throws:
NullPointerException- iforiginHostisnull.
-
getOriginRealm
DiameterIdentity getOriginRealm()
Returns the value of the Origin-Realm AVP, of type DiameterIdentity. A return value of null implies that the AVP has not been set.- Specified by:
getOriginRealmin interfaceDiameterMessage
-
setOriginRealm
void setOriginRealm(DiameterIdentity originRealm)
Sets the value of the Origin-Realm AVP, of type DiameterIdentity.- Specified by:
setOriginRealmin interfaceDiameterMessage- Throws:
NullPointerException- iforiginRealmisnull.
-
getDestinationHost
DiameterIdentity getDestinationHost()
Returns the value of the Destination-Host AVP, of type DiameterIdentity. A return value of null implies that the AVP has not been set.- Specified by:
getDestinationHostin interfaceDiameterMessage
-
setDestinationHost
void setDestinationHost(DiameterIdentity destinationHost)
Sets the value of the Destination-Host AVP, of type DiameterIdentity.- Specified by:
setDestinationHostin interfaceDiameterMessage- Throws:
NullPointerException- ifdestinationHostisnull.
-
getDestinationRealm
DiameterIdentity getDestinationRealm()
Returns the value of the Destination-Realm AVP, of type DiameterIdentity. A return value of null implies that the AVP has not been set.- Specified by:
getDestinationRealmin interfaceDiameterMessage
-
setDestinationRealm
void setDestinationRealm(DiameterIdentity destinationRealm)
Sets the value of the Destination-Realm AVP, of type DiameterIdentity.- Specified by:
setDestinationRealmin interfaceDiameterMessage- Throws:
NullPointerException- ifdestinationRealmisnull.
-
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- ifavpsisnull.
-
removeExtensionAvps
void removeExtensionAvps()
Removes all extension AVPs from the message. If no extension AVPs are present, this method returns silently.
-
-