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 int
commandCode
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DiameterIdentity
getDestinationHost()
Returns the value of the Destination-Host AVP, of type DiameterIdentity.DiameterIdentity
getDestinationRealm()
Returns the value of the Destination-Realm AVP, of type DiameterIdentity.DiameterAvp[]
getExtensionAvps()
Returns the set of extension 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.String
getSessionId()
Returns the value of the Session-Id AVP, of type UTF8String.boolean
hasSessionId()
Returns true if the Session-Id AVP is present in the message.void
removeExtensionAvps()
Removes all extension AVPs from the message.void
setDestinationHost(DiameterIdentity destinationHost)
Sets the value of the Destination-Host AVP, of type DiameterIdentity.void
setDestinationRealm(DiameterIdentity destinationRealm)
Sets the value of the Destination-Realm AVP, of type DiameterIdentity.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension 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
setSessionId(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:
getSessionId
in interfaceDiameterMessage
-
setSessionId
void setSessionId(String sessionId)
Sets the value of the Session-Id AVP, of type UTF8String.- Specified by:
setSessionId
in interfaceDiameterMessage
- Throws:
NullPointerException
- ifsessionId
isnull
.
-
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:
getOriginHost
in interfaceDiameterMessage
-
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
.
-
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:
getOriginRealm
in interfaceDiameterMessage
-
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
.
-
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:
getDestinationHost
in interfaceDiameterMessage
-
setDestinationHost
void setDestinationHost(DiameterIdentity destinationHost)
Sets the value of the Destination-Host AVP, of type DiameterIdentity.- Specified by:
setDestinationHost
in interfaceDiameterMessage
- Throws:
NullPointerException
- ifdestinationHost
isnull
.
-
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:
getDestinationRealm
in interfaceDiameterMessage
-
setDestinationRealm
void setDestinationRealm(DiameterIdentity destinationRealm)
Sets the value of the Destination-Realm AVP, of type DiameterIdentity.- Specified by:
setDestinationRealm
in interfaceDiameterMessage
- Throws:
NullPointerException
- ifdestinationRealm
isnull
.
-
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.
-
-