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

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

public interface ErrorAnswer
extends DiameterMessage

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

 7.2.  Error Bit
 
    The 'E' (Error Bit) in the Diameter header is set when the request
    caused a protocol-related error (see Section 7.1.3).  A message with
    the 'E' bit MUST NOT be sent as a response to an answer message.
    Note that a message with the 'E' bit set is still subjected to the
    processing rules defined in Section 6.2.  When set, the answer
    message will not conform to the ABNF specification for the command,
    and will instead conform to the following ABNF:
 
    Message Format
 
    <Error-Answer> ::= < Diameter Header: 0, ERR [PXY] >
                      0*1< Session-Id >
                         { Origin-Host }
                         { Origin-Realm }
                         { Result-Code }
                         [ Origin-State-Id ]
                         [ Error-Reporting-Host ]
                         [ Proxy-Info ]
                       * [ AVP ]
    Note that the code used in the header is the same than the one found
    in the request message, but with the 'R' bit cleared and the 'E' bit
    set.  The 'P' bit in the header is set to the same value as the one
    found in the request message.
 
 

Author:
Alexandre Mendonca , Bartosz Baranowski

Field Summary
static int commandCode
           
 
Method Summary
 DiameterIdentity getErrorReportingHost()
          Returns the value of the Error-Reporting-Host AVP, of type DiameterIdentity.
 long getOriginStateId()
          Returns the value of the Origin-State-Id AVP, of type Unsigned32.
 ProxyInfoAvp getProxyInfo()
          Returns the value of the Proxy-Info AVP, of type Grouped.
 long getResultCode()
          Returns the value of the Result-Code AVP, of type Unsigned32.
 boolean hasErrorReportingHost()
          Returns true if the Error-Reporting-Host AVP is present in the message.
 boolean hasOriginStateId()
          Returns true if the Origin-State-Id AVP is present in the message.
 boolean hasProxyInfo()
          Returns true if the Proxy-Info AVP is present in the message.
 boolean hasResultCode()
          Returns true if the Result-Code AVP is present in the message.
 void setErrorReportingHost(DiameterIdentity errorReportingHost)
          Sets the value of the Error-Reporting-Host AVP, of type DiameterIdentity.
 void setOriginStateId(long originStateId)
          Sets the value of the Origin-State-Id AVP, of type Unsigned32.
 void setProxyInfo(ProxyInfoAvp proxyInfo)
          Sets the value of the Proxy-Info AVP, of type Grouped.
 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, hasDestinationHost, hasDestinationRealm, 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

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. Use hasOriginStateId() to check the existence of this AVP.

Returns:
the value of the Origin-State-Id AVP
Throws:
java.lang.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.

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

hasErrorReportingHost

boolean hasErrorReportingHost()
Returns true if the Error-Reporting-Host AVP is present in the message.


getErrorReportingHost

DiameterIdentity getErrorReportingHost()
Returns the value of the Error-Reporting-Host AVP, of type DiameterIdentity.

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

setErrorReportingHost

void setErrorReportingHost(DiameterIdentity errorReportingHost)
Sets the value of the Error-Reporting-Host AVP, of type DiameterIdentity.

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

hasProxyInfo

boolean hasProxyInfo()
Returns true if the Proxy-Info AVP is present in the message.


getProxyInfo

ProxyInfoAvp getProxyInfo()
Returns the value of the Proxy-Info AVP, of type Grouped.

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

setProxyInfo

void setProxyInfo(ProxyInfoAvp proxyInfo)
Sets the value of the Proxy-Info AVP, of type Grouped.

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


Copyright © 2011. All Rights Reserved.