Interface ReAuthAnswer
-
- All Superinterfaces:
Cloneable
,DiameterMessage
public interface ReAuthAnswer extends DiameterMessage
Defines an interface representing the Re-Auth-Answer command. From the Diameter Credit-Control Application (rfc4006.txt) specification:8.3.2. Re-Auth-Answer The Re-Auth-Answer (RAA), indicated by the Command-Code set to 258 and the message flags' 'R' bit clear, is sent in response to the RAR. The Result-Code AVP MUST be present, and indicates the disposition of the request. A successful RAA message MUST be followed by an application-specific authentication and/or authorization message. Message Format <Re-Auth-Answer> ::= < Diameter Header: 258, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] [ Origin-State-Id ] [ Error-Message ] [ Error-Reporting-Host ] * [ Failed-AVP ] * [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] [ CC-Sub-Session-Id ] [ G-S-U-Pool-Identifier ] [ Service-Identifier ] [ Rating-Group ] * [ 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 long
getCcSubSessionId()
Returns the value of the CC-Sub-Session-Id AVP, of type Unsigned64.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.DiameterAvp[]
getExtensionAvps()
Returns the set of extension AVPs.FailedAvp[]
getFailedAvps()
Returns the set of Failed-AVP AVPs.long
getGsuPoolIdentifier()
Returns the value of the G-S-U-Pool-Identifier AVP, of type Unsigned32.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
getRatingGroup()
Returns the value of the Rating-Group AVP, of type Unsigned32.DiameterURI[]
getRedirectHosts()
Returns the set of Redirect-Host AVPs.RedirectHostUsage
getRedirectHostUsage()
Returns the value of the Redirect-Host-Usage AVP, of type Enumerated.long
getRedirectMaxCacheTime()
Returns the value of the Redirect-Max-Cache-Time AVP, of type Unsigned32.long
getResultCode()
Returns the value of the Result-Code AVP, of type Unsigned32.long
getServiceIdentifier()
Returns the value of the Service-Identifier AVP, of type Unsigned32.String
getSessionId()
Returns the value of the Session-Id AVP, of type UTF8String.String
getUserName()
Returns the value of the User-Name AVP, of type UTF8String.boolean
hasCcSubSessionId()
Returns true if the CC-Sub-Session-Id AVP is present in the message.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
hasGsuPoolIdentifier()
Returns true if the G-S-U-Pool-Identifier 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
hasRatingGroup()
Returns true if the Rating-Group AVP is present in the message.boolean
hasRedirectHostUsage()
Returns true if the Redirect-Host-Usage AVP is present in the message.boolean
hasRedirectMaxCacheTime()
Returns true if the Redirect-Max-Cache-Time AVP is present in the message.boolean
hasResultCode()
Returns true if the Result-Code AVP is present in the message.boolean
hasServiceIdentifier()
Returns true if the Service-Identifier AVP is present in the message.boolean
hasSessionId()
Returns true if the Session-Id AVP is present in the message.boolean
hasUserName()
Returns true if the User-Name AVP is present in the message.void
removeCcSubSessionId()
Removes the CC-Sub-Session-Id AVP from the message.void
removeErrorMessage()
Removes the Error-Message AVP from the message.void
removeErrorReportingHost()
Removes the Error-Reporting-Host AVP from the message.void
removeExtensionAvps()
Removes all extension AVPs from the message.void
removeFailedAvps()
Removes all Failed-AVP AVPs from the message.void
removeGsuPoolIdentifier()
Removes the G-S-U-Pool-Identifier 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
removeRatingGroup()
Removes the Rating-Group AVP from the message.void
removeRedirectHosts()
Removes all Redirect-Host AVPs from the message.void
removeRedirectHostUsage()
Removes the Redirect-Host-Usage AVP from the message.void
removeRedirectMaxCacheTime()
Removes the Redirect-Max-Cache-Time AVP from the message.void
removeResultCode()
Removes the Result-Code AVP from the message.void
removeServiceIdentifier()
Removes the Service-Identifier AVP from the message.void
removeSessionId()
Removes the Session-Id AVP from the message.void
removeUserName()
Removes the User-Name AVP from the message.void
setCcSubSessionId(long ccSubSessionId)
Sets the value of the CC-Sub-Session-Id AVP, of type Unsigned64.void
setErrorMessage(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
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.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
setGsuPoolIdentifier(long gsuPoolIdentifier)
Sets the value of the G-S-U-Pool-Identifier AVP, of type Unsigned32.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
setRatingGroup(long ratingGroup)
Sets the value of the Rating-Group AVP, of type Unsigned32.void
setRedirectHost(DiameterURI redirectHost)
Sets a single Redirect-Host AVP in the message, of type DiameterURI.void
setRedirectHosts(DiameterURI[] redirectHosts)
Sets the set of Redirect-Host AVPs, with all the values in the given array.void
setRedirectHostUsage(RedirectHostUsage redirectHostUsage)
Sets the value of the Redirect-Host-Usage AVP, of type Enumerated.void
setRedirectMaxCacheTime(long redirectMaxCacheTime)
Sets the value of the Redirect-Max-Cache-Time AVP, of type Unsigned32.void
setResultCode(long resultCode)
Sets the value of the Result-Code AVP, of type Unsigned32.void
setServiceIdentifier(long serviceIdentifier)
Sets the value of the Service-Identifier AVP, of type Unsigned32.void
setSessionId(String sessionId)
Sets the value of the Session-Id AVP, of type UTF8String.void
setUserName(String userName)
Sets the value of the User-Name AVP, of type UTF8String.-
Methods inherited from interface org.jainslee.resources.diameter.base.DiameterMessage
clone, getAvps, getCommand, getDestinationHost, getDestinationRealm, getHeader, setDestinationHost, setDestinationRealm
-
-
-
-
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.- Specified by:
getSessionId
in interfaceDiameterMessage
- Returns:
- the value of the Session-Id AVP or null if it has not been set on this message
-
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
.
-
removeSessionId
void removeSessionId()
Removes the Session-Id AVP from the message. If the Session-Id AVP is not present, this method returns silently.
-
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. UsehasResultCode()
to check the existence of this AVP.- Returns:
- the value of the Result-Code AVP
- Throws:
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.
-
removeResultCode
void removeResultCode()
Removes the Result-Code AVP from the message. If the Result-Code AVP is not present, this method returns silently.
-
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:
getOriginHost
in 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:
setOriginHost
in interfaceDiameterMessage
- Throws:
NullPointerException
- iforiginHost
isnull
.
-
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:
getOriginRealm
in 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:
setOriginRealm
in interfaceDiameterMessage
- Throws:
NullPointerException
- iforiginRealm
isnull
.
-
removeOriginRealm
void removeOriginRealm()
Removes the Origin-Realm AVP from the message. If the Origin-Realm AVP is not present, this method returns silently.
-
hasUserName
boolean hasUserName()
Returns true if the User-Name AVP is present in the message.
-
getUserName
String getUserName()
Returns the value of the User-Name AVP, of type UTF8String.- Returns:
- the value of the User-Name AVP or null if it has not been set on this message
-
setUserName
void setUserName(String userName)
Sets the value of the User-Name AVP, of type UTF8String.- Throws:
NullPointerException
- ifuserName
isnull
.
-
removeUserName
void removeUserName()
Removes the User-Name AVP from the message. If the User-Name AVP is not present, this method returns silently.
-
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. UsehasOriginStateId()
to check the existence of this AVP.- Returns:
- the value of the Origin-State-Id AVP
- Throws:
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.
-
removeOriginStateId
void removeOriginStateId()
Removes the Origin-State-Id AVP from the message. If the Origin-State-Id AVP is not present, this method returns silently.
-
hasErrorMessage
boolean hasErrorMessage()
Returns true if the Error-Message AVP is present in the message.
-
getErrorMessage
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(String errorMessage)
Sets the value of the Error-Message AVP, of type UTF8String.- Throws:
NullPointerException
- iferrorMessage
isnull
.
-
removeErrorMessage
void removeErrorMessage()
Removes the Error-Message AVP from the message. If the Error-Message AVP is not present, this method returns silently.
-
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:
NullPointerException
- iferrorReportingHost
isnull
.
-
removeErrorReportingHost
void removeErrorReportingHost()
Removes the Error-Reporting-Host AVP from the message. If the Error-Reporting-Host AVP is not present, this method returns silently.
-
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:
NullPointerException
- iffailedAvp
isnull
.
-
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:
NullPointerException
- iffailedAvps
isnull
.
-
removeFailedAvps
void removeFailedAvps()
Removes all Failed-AVP AVPs from the message. If no Failed-AVP AVPs are present, this method returns silently.
-
getRedirectHosts
DiameterURI[] getRedirectHosts()
Returns the set of Redirect-Host AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Redirect-Host AVPs have been set. The elements in the given array are DiameterURI objects.
-
setRedirectHost
void setRedirectHost(DiameterURI redirectHost)
Sets a single Redirect-Host AVP in the message, of type DiameterURI.- Throws:
NullPointerException
- ifredirectHost
isnull
.
-
setRedirectHosts
void setRedirectHosts(DiameterURI[] redirectHosts)
Sets the set of Redirect-Host 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 getRedirectHosts() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException
- ifredirectHosts
isnull
.
-
removeRedirectHosts
void removeRedirectHosts()
Removes all Redirect-Host AVPs from the message. If no Redirect-Host AVPs are present, this method returns silently.
-
hasRedirectHostUsage
boolean hasRedirectHostUsage()
Returns true if the Redirect-Host-Usage AVP is present in the message.
-
getRedirectHostUsage
RedirectHostUsage getRedirectHostUsage()
Returns the value of the Redirect-Host-Usage AVP, of type Enumerated.- Returns:
- the value of the Redirect-Host-Usage AVP or null if it has not been set on this message
-
setRedirectHostUsage
void setRedirectHostUsage(RedirectHostUsage redirectHostUsage)
Sets the value of the Redirect-Host-Usage AVP, of type Enumerated.- Throws:
NullPointerException
- ifredirectHostUsage
isnull
.
-
removeRedirectHostUsage
void removeRedirectHostUsage()
Removes the Redirect-Host-Usage AVP from the message. If the Redirect-Host-Usage AVP is not present, this method returns silently.
-
hasRedirectMaxCacheTime
boolean hasRedirectMaxCacheTime()
Returns true if the Redirect-Max-Cache-Time AVP is present in the message.
-
getRedirectMaxCacheTime
long getRedirectMaxCacheTime()
Returns the value of the Redirect-Max-Cache-Time AVP, of type Unsigned32. UsehasRedirectMaxCacheTime()
to check the existence of this AVP.- Returns:
- the value of the Redirect-Max-Cache-Time AVP
- Throws:
IllegalStateException
- if the Redirect-Max-Cache-Time AVP has not been set on this message
-
setRedirectMaxCacheTime
void setRedirectMaxCacheTime(long redirectMaxCacheTime)
Sets the value of the Redirect-Max-Cache-Time AVP, of type Unsigned32.
-
removeRedirectMaxCacheTime
void removeRedirectMaxCacheTime()
Removes the Redirect-Max-Cache-Time AVP from the message. If the Redirect-Max-Cache-Time AVP is not present, this method returns silently.
-
getProxyInfos
ProxyInfo[] getProxyInfos()
Returns the set of Proxy-Info AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Proxy-Info AVPs have been set. The elements in the given array are ProxyInfo objects.
-
setProxyInfo
void setProxyInfo(ProxyInfo proxyInfo)
Sets a single Proxy-Info AVP in the message, of type Grouped.- Throws:
NullPointerException
- ifproxyInfo
isnull
.
-
setProxyInfos
void setProxyInfos(ProxyInfo[] proxyInfos)
Sets the set of Proxy-Info 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 getProxyInfos() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException
- ifproxyInfos
isnull
.
-
removeProxyInfos
void removeProxyInfos()
Removes all Proxy-Info AVPs from the message. If no Proxy-Info AVPs are present, this method returns silently.
-
hasCcSubSessionId
boolean hasCcSubSessionId()
Returns true if the CC-Sub-Session-Id AVP is present in the message.
-
getCcSubSessionId
long getCcSubSessionId()
Returns the value of the CC-Sub-Session-Id AVP, of type Unsigned64. UsehasCcSubSessionId()
to check the existence of this AVP.- Returns:
- the value of the CC-Sub-Session-Id AVP
- Throws:
IllegalStateException
- if the CC-Sub-Session-Id AVP has not been set on this message
-
setCcSubSessionId
void setCcSubSessionId(long ccSubSessionId)
Sets the value of the CC-Sub-Session-Id AVP, of type Unsigned64.
-
removeCcSubSessionId
void removeCcSubSessionId()
Removes the CC-Sub-Session-Id AVP from the message. If the CC-Sub-Session-Id AVP is not present, this method returns silently.
-
hasGsuPoolIdentifier
boolean hasGsuPoolIdentifier()
Returns true if the G-S-U-Pool-Identifier AVP is present in the message.
-
getGsuPoolIdentifier
long getGsuPoolIdentifier()
Returns the value of the G-S-U-Pool-Identifier AVP, of type Unsigned32. UsehasGsuPoolIdentifier()
to check the existence of this AVP.- Returns:
- the value of the G-S-U-Pool-Identifier AVP
- Throws:
IllegalStateException
- if the G-S-U-Pool-Identifier AVP has not been set on this message
-
setGsuPoolIdentifier
void setGsuPoolIdentifier(long gsuPoolIdentifier)
Sets the value of the G-S-U-Pool-Identifier AVP, of type Unsigned32.
-
removeGsuPoolIdentifier
void removeGsuPoolIdentifier()
Removes the G-S-U-Pool-Identifier AVP from the message. If the G-S-U-Pool-Identifier AVP is not present, this method returns silently.
-
hasServiceIdentifier
boolean hasServiceIdentifier()
Returns true if the Service-Identifier AVP is present in the message.
-
getServiceIdentifier
long getServiceIdentifier()
Returns the value of the Service-Identifier AVP, of type Unsigned32. UsehasServiceIdentifier()
to check the existence of this AVP.- Returns:
- the value of the Service-Identifier AVP
- Throws:
IllegalStateException
- if the Service-Identifier AVP has not been set on this message
-
setServiceIdentifier
void setServiceIdentifier(long serviceIdentifier)
Sets the value of the Service-Identifier AVP, of type Unsigned32.
-
removeServiceIdentifier
void removeServiceIdentifier()
Removes the Service-Identifier AVP from the message. If the Service-Identifier AVP is not present, this method returns silently.
-
hasRatingGroup
boolean hasRatingGroup()
Returns true if the Rating-Group AVP is present in the message.
-
getRatingGroup
long getRatingGroup()
Returns the value of the Rating-Group AVP, of type Unsigned32. UsehasRatingGroup()
to check the existence of this AVP.- Returns:
- the value of the Rating-Group AVP
- Throws:
IllegalStateException
- if the Rating-Group AVP has not been set on this message
-
setRatingGroup
void setRatingGroup(long ratingGroup)
Sets the value of the Rating-Group AVP, of type Unsigned32.
-
removeRatingGroup
void removeRatingGroup()
Removes the Rating-Group AVP from the message. If the Rating-Group 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
- ifavps
isnull
.
-
removeExtensionAvps
void removeExtensionAvps()
Removes all extension AVPs from the message. If no extension AVPs are present, this method returns silently.
-
-