Interface DisconnectPeerRequest
-
- All Superinterfaces:
Cloneable,DiameterMessage
public interface DisconnectPeerRequest extends DiameterMessage
Defines an interface representing the Disconnect-Peer-Request command. From the Diameter Base Protocol (rfc6733.txt) specification:5.4.1. Disconnect-Peer-Request The Disconnect-Peer-Request (DPR), indicated by the Command Code set to 282 and the Command Flags' 'R' bit set, is sent to a peer to inform it of its intentions to shut down the transport connection. Upon detection of a transport failure, this message MUST NOT be sent to an alternate peer. Message Format <Disconnect-Peer-Request> ::= < Diameter Header: 282, REQ > { Origin-Host } { Origin-Realm } { Disconnect-Cause } * [ AVP ]
-
-
Field Summary
Fields Modifier and Type Field Description static intcommandCode
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DisconnectCausegetDisconnectCause()Returns the value of the Disconnect-Cause AVP, of type Enumerated.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.booleanhasDisconnectCause()Returns true if the Disconnect-Cause AVP is present in the message.booleanhasOriginHost()Returns true if the Origin-Host AVP is present in the message.booleanhasOriginRealm()Returns true if the Origin-Realm AVP is present in the message.voidremoveDisconnectCause()Removes the Disconnect-Cause AVP from the message.voidremoveExtensionAvps()Removes all extension AVPs from the message.voidremoveOriginHost()Removes the Origin-Host AVP from the message.voidremoveOriginRealm()Removes the Origin-Realm AVP from the message.voidsetDisconnectCause(DisconnectCause disconnectCause)Sets the value of the Disconnect-Cause AVP, of type Enumerated.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.-
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:
getOriginHostin 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:
setOriginHostin interfaceDiameterMessage- Throws:
NullPointerException- iforiginHostisnull.
-
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:
getOriginRealmin 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:
setOriginRealmin interfaceDiameterMessage- Throws:
NullPointerException- iforiginRealmisnull.
-
removeOriginRealm
void removeOriginRealm()
Removes the Origin-Realm AVP from the message. If the Origin-Realm AVP is not present, this method returns silently.
-
hasDisconnectCause
boolean hasDisconnectCause()
Returns true if the Disconnect-Cause AVP is present in the message.
-
getDisconnectCause
DisconnectCause getDisconnectCause()
Returns the value of the Disconnect-Cause AVP, of type Enumerated.- Returns:
- the value of the Disconnect-Cause AVP or null if it has not been set on this message
-
setDisconnectCause
void setDisconnectCause(DisconnectCause disconnectCause)
Sets the value of the Disconnect-Cause AVP, of type Enumerated.- Throws:
NullPointerException- ifdisconnectCauseisnull.
-
removeDisconnectCause
void removeDisconnectCause()
Removes the Disconnect-Cause AVP from the message. If the Disconnect-Cause 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- ifavpsisnull.
-
removeExtensionAvps
void removeExtensionAvps()
Removes all extension AVPs from the message. If no extension AVPs are present, this method returns silently.
-
-