public interface ErrorAnswer extends DiameterMessage
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 CCF specification for the command; instead, it and will conform to the following CCF: Message Format <Error-Answer> ::= < Diameter Header: 0, ERR [PXY] > 0*1< Session-Id > { Origin-Host } { Origin-Realm } { Result-Code } [ Origin-State-Id ] [ Error-Message ] [ Error-Reporting-Host ] [ Failed-AVP ] [ Experimental-Result ] * [ 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.
Modifier and Type | Field and Description |
---|---|
static int |
commandCode |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getErrorMessage()
Returns the value of the Error-Message AVP, of type UTF8String.
|
DiameterIdentity |
getErrorReportingHost()
Returns the value of the Error-Reporting-Host AVP, of type DiameterIdentity.
|
ExperimentalResult |
getExperimentalResult()
Returns the value of the Experimental-Result AVP, of type Grouped.
|
DiameterAvp[] |
getExtensionAvps()
Returns the set of extension AVPs.
|
FailedAvp |
getFailedAvp()
Returns the value of the Failed-AVP AVP, of type Grouped.
|
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.
|
long |
getOriginStateId()
Returns the value of the Origin-State-Id AVP, of type Unsigned32.
|
ProxyInfo[] |
getProxyInfos()
Returns the set of Proxy-Info AVPs.
|
long |
getResultCode()
Returns the value of the Result-Code AVP, of type Unsigned32.
|
java.lang.String |
getSessionId()
Returns the value of the Session-Id AVP, of type UTF8String.
|
boolean |
hasErrorMessage()
Returns true if the Error-Message AVP is present in the message.
|
boolean |
hasErrorReportingHost()
Returns true if the Error-Reporting-Host AVP is present in the message.
|
boolean |
hasExperimentalResult()
Returns true if the Experimental-Result AVP is present in the message.
|
boolean |
hasFailedAvp()
Returns true if the Failed-AVP AVP is present in the message.
|
boolean |
hasOriginHost()
Returns true if the Origin-Host AVP is present in the message.
|
boolean |
hasOriginRealm()
Returns true if the Origin-Realm AVP is present in the message.
|
boolean |
hasOriginStateId()
Returns true if the Origin-State-Id AVP is present in the message.
|
boolean |
hasResultCode()
Returns true if the Result-Code AVP is present in the message.
|
boolean |
hasSessionId()
Returns true if the Session-Id AVP is present in the message.
|
void |
removeErrorMessage()
Removes the Error-Message AVP from the message.
|
void |
removeErrorReportingHost()
Removes the Error-Reporting-Host AVP from the message.
|
void |
removeExperimentalResult()
Removes the Experimental-Result AVP from the message.
|
void |
removeExtensionAvps()
Removes all extension AVPs from the message.
|
void |
removeFailedAvp()
Removes the Failed-AVP AVP from the message.
|
void |
removeOriginHost()
Removes the Origin-Host AVP from the message.
|
void |
removeOriginRealm()
Removes the Origin-Realm AVP from the message.
|
void |
removeOriginStateId()
Removes the Origin-State-Id AVP from the message.
|
void |
removeProxyInfos()
Removes all Proxy-Info AVPs from the message.
|
void |
removeResultCode()
Removes the Result-Code AVP from the message.
|
void |
removeSessionId()
Removes the Session-Id AVP from the message.
|
void |
setErrorMessage(java.lang.String errorMessage)
Sets the value of the Error-Message AVP, of type UTF8String.
|
void |
setErrorReportingHost(DiameterIdentity errorReportingHost)
Sets the value of the Error-Reporting-Host AVP, of type DiameterIdentity.
|
void |
setExperimentalResult(ExperimentalResult experimentalResult)
Sets the value of the Experimental-Result AVP, of type Grouped.
|
void |
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.
|
void |
setFailedAvp(FailedAvp failedAvp)
Sets the value of the Failed-AVP AVP, of type Grouped.
|
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 |
setOriginStateId(long originStateId)
Sets the value of the Origin-State-Id AVP, of type Unsigned32.
|
void |
setProxyInfo(ProxyInfo proxyInfo)
Sets a single Proxy-Info AVP in the message, of type Grouped.
|
void |
setProxyInfos(ProxyInfo[] proxyInfos)
Sets the set of Proxy-Info AVPs, with all the values in the given array.
|
void |
setResultCode(long resultCode)
Sets the value of the Result-Code AVP, of type Unsigned32.
|
void |
setSessionId(java.lang.String sessionId)
Sets the value of the Session-Id AVP, of type UTF8String.
|
clone, getAvps, getCommand, getDestinationHost, getDestinationRealm, getHeader, setDestinationHost, setDestinationRealm
static final int commandCode
boolean hasSessionId()
java.lang.String getSessionId()
getSessionId
in interface DiameterMessage
void setSessionId(java.lang.String sessionId)
setSessionId
in interface DiameterMessage
java.lang.NullPointerException
- if sessionId
is null
.void removeSessionId()
boolean hasOriginHost()
DiameterIdentity getOriginHost()
getOriginHost
in interface DiameterMessage
void setOriginHost(DiameterIdentity originHost)
setOriginHost
in interface DiameterMessage
java.lang.NullPointerException
- if originHost
is null
.void removeOriginHost()
boolean hasOriginRealm()
DiameterIdentity getOriginRealm()
getOriginRealm
in interface DiameterMessage
void setOriginRealm(DiameterIdentity originRealm)
setOriginRealm
in interface DiameterMessage
java.lang.NullPointerException
- if originRealm
is null
.void removeOriginRealm()
boolean hasResultCode()
long getResultCode()
hasResultCode()
to check the existence of this AVP.java.lang.IllegalStateException
- if the Result-Code AVP has not been set on this messagevoid setResultCode(long resultCode)
void removeResultCode()
boolean hasOriginStateId()
long getOriginStateId()
hasOriginStateId()
to check the existence of this AVP.java.lang.IllegalStateException
- if the Origin-State-Id AVP has not been set on this messagevoid setOriginStateId(long originStateId)
void removeOriginStateId()
boolean hasErrorMessage()
java.lang.String getErrorMessage()
void setErrorMessage(java.lang.String errorMessage)
java.lang.NullPointerException
- if errorMessage
is null
.void removeErrorMessage()
boolean hasErrorReportingHost()
DiameterIdentity getErrorReportingHost()
void setErrorReportingHost(DiameterIdentity errorReportingHost)
java.lang.NullPointerException
- if errorReportingHost
is null
.void removeErrorReportingHost()
boolean hasFailedAvp()
FailedAvp getFailedAvp()
void setFailedAvp(FailedAvp failedAvp)
java.lang.NullPointerException
- if failedAvp
is null
.void removeFailedAvp()
boolean hasExperimentalResult()
ExperimentalResult getExperimentalResult()
void setExperimentalResult(ExperimentalResult experimentalResult)
java.lang.NullPointerException
- if experimentalResult
is null
.void removeExperimentalResult()
ProxyInfo[] getProxyInfos()
void setProxyInfo(ProxyInfo proxyInfo)
java.lang.NullPointerException
- if proxyInfo
is null
.void setProxyInfos(ProxyInfo[] proxyInfos)
java.lang.NullPointerException
- if proxyInfos
is null
.void removeProxyInfos()
DiameterAvp[] getExtensionAvps()
void setExtensionAvps(DiameterAvp[] avps) throws AvpNotAllowedException
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)java.lang.NullPointerException
- if avps
is null
.void removeExtensionAvps()