net.java.slee.resource.diameter.base.events
Interface DisconnectPeerAnswer

All Superinterfaces:
java.lang.Cloneable, DiameterMessage
All Known Implementing Classes:
DisconnectPeerAnswerImpl

public interface DisconnectPeerAnswer
extends DiameterMessage

Defines an interface representing the Disconnect-Peer-Answer command. From the Diameter Base Protocol (rfc3588.txt) specification:

 5.4.2.  Disconnect-Peer-Answer
 
    The Disconnect-Peer-Answer (DPA), indicated by the Command-Code set
    to 282 and the Command Flags' 'R' bit cleared, is sent as a response
    to the Disconnect-Peer-Request message.  Upon receipt of this
    message, the transport connection is shutdown.
 
    Message Format
 
       <Disconnect-Peer-Answer>  ::= < Diameter Header: 282 >
                  { Result-Code }
                  { Origin-Host }
                  { Origin-Realm }
                  [ Error-Message ]
                * [ Failed-AVP ]
 


Field Summary
static int commandCode
           
 
Method Summary
 java.lang.String getErrorMessage()
          Returns the value of the Error-Message AVP, of type UTF8String.
 FailedAvp[] getFailedAvps()
          Returns the set of Failed-AVP AVPs.
 long getResultCode()
          Returns the value of the Result-Code AVP, of type Unsigned32.
 boolean hasErrorMessage()
          Returns true if the Error-Message AVP is present in the message.
 boolean hasResultCode()
          Returns true if the Result-Code AVP is present in the message.
 void setErrorMessage(java.lang.String errorMessage)
          Sets the value of the Error-Message AVP, of type UTF8String.
 void setFailedAvp(FailedAvp failedAvp)
          Sets a single Failed-AVP AVP in the message, of type Grouped.
 void setFailedAvps(FailedAvp[] failedAvps)
          Sets the set of Failed-AVP AVPs, with all the values in the given array.
 void setResultCode(long resultCode)
          Sets the value of the Result-Code AVP, of type Unsigned32.
 
Methods inherited from interface net.java.slee.resource.diameter.base.events.DiameterMessage
clone, getAvps, getCommand, getDestinationHost, getDestinationRealm, getExtensionAvps, getHeader, getOriginHost, getOriginRealm, getSessionId, hasOriginHost, hasOriginRealm, hasSessionId, setDestinationHost, setDestinationRealm, setExtensionAvps, setOriginHost, setOriginRealm, setSessionId
 

Field Detail

commandCode

static final int commandCode
See Also:
Constant Field Values
Method Detail

hasResultCode

boolean hasResultCode()
Returns true if the Result-Code AVP is present in the message.


getResultCode

long getResultCode()
Returns the value of the Result-Code AVP, of type Unsigned32. Use hasResultCode() to check the existence of this AVP.

Returns:
the value of the Result-Code AVP
Throws:
java.lang.IllegalStateException - if the Result-Code AVP has not been set on this message

setResultCode

void setResultCode(long resultCode)
Sets the value of the Result-Code AVP, of type Unsigned32.

Throws:
java.lang.IllegalStateException - if setResultCode has already been called

hasErrorMessage

boolean hasErrorMessage()
Returns true if the Error-Message AVP is present in the message.


getErrorMessage

java.lang.String getErrorMessage()
Returns the value of the Error-Message AVP, of type UTF8String.

Returns:
the value of the Error-Message AVP or null if it has not been set on this message

setErrorMessage

void setErrorMessage(java.lang.String errorMessage)
Sets the value of the Error-Message AVP, of type UTF8String.

Throws:
java.lang.IllegalStateException - if setErrorMessage has already been called

getFailedAvps

FailedAvp[] getFailedAvps()
Returns the set of Failed-AVP AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Failed-AVP AVPs have been set. The elements in the given array are FailedAvp objects.


setFailedAvp

void setFailedAvp(FailedAvp failedAvp)
Sets a single Failed-AVP AVP in the message, of type Grouped.

Throws:
java.lang.IllegalStateException - if setFailedAvp or setFailedAvps has already been called

setFailedAvps

void setFailedAvps(FailedAvp[] failedAvps)
Sets the set of Failed-AVP 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 getFailedAvps() is not guaranteed to return the same array instance, e.g. an "==" check would fail.

Throws:
java.lang.IllegalStateException - if setFailedAvp or setFailedAvps has already been called


Copyright © 2008. All Rights Reserved.