Interface ReAuthRequest
-
- All Superinterfaces:
Cloneable,DiameterMessage
public interface ReAuthRequest extends DiameterMessage
Defines an interface representing the Re-Auth-Request command. From the Diameter Base Protocol (rfc6733.txt) specification:8.3.1. Re-Auth-Request The Re-Auth-Request (RAR), indicated by the Command Code set to 258 and the message flags' 'R' bit set, may be sent by any server to the access device that is providing session service, to request that the user be re-authenticated and/or re-authorized. Message Format <Re-Auth-Request> ::= < Diameter Header: 258, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Destination-Host } { Auth-Application-Id } { Re-Auth-Request-Type } [ User-Name ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ]
-
-
Field Summary
Fields Modifier and Type Field Description static intcommandCode
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetAuthApplicationId()Returns the value of the Auth-Application-Id AVP, of type Unsigned32.DiameterIdentitygetDestinationHost()Returns the value of the Destination-Host AVP, of type DiameterIdentity.DiameterIdentitygetDestinationRealm()Returns the value of the Destination-Realm AVP, of type DiameterIdentity.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.longgetOriginStateId()Returns the value of the Origin-State-Id AVP, of type Unsigned32.ProxyInfo[]getProxyInfos()Returns the set of Proxy-Info AVPs.ReAuthRequestTypegetReAuthRequestType()Returns the value of the Re-Auth-Request-Type AVP, of type Enumerated.DiameterIdentity[]getRouteRecords()Returns the set of Route-Record AVPs.StringgetSessionId()Returns the value of the Session-Id AVP, of type UTF8String.StringgetUserName()Returns the value of the User-Name AVP, of type UTF8String.booleanhasAuthApplicationId()Returns true if the Auth-Application-Id AVP is present in the message.booleanhasDestinationHost()Returns true if the Destination-Host AVP is present in the message.booleanhasDestinationRealm()Returns true if the Destination-Realm 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.booleanhasOriginStateId()Returns true if the Origin-State-Id AVP is present in the message.booleanhasReAuthRequestType()Returns true if the Re-Auth-Request-Type AVP is present in the message.booleanhasSessionId()Returns true if the Session-Id AVP is present in the message.booleanhasUserName()Returns true if the User-Name AVP is present in the message.voidremoveAuthApplicationId()Removes the Auth-Application-Id AVP from the message.voidremoveDestinationHost()Removes the Destination-Host AVP from the message.voidremoveDestinationRealm()Removes the Destination-Realm 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.voidremoveOriginStateId()Removes the Origin-State-Id AVP from the message.voidremoveProxyInfos()Removes all Proxy-Info AVPs from the message.voidremoveReAuthRequestType()Removes the Re-Auth-Request-Type AVP from the message.voidremoveRouteRecords()Removes all Route-Record AVPs from the message.voidremoveSessionId()Removes the Session-Id AVP from the message.voidremoveUserName()Removes the User-Name AVP from the message.voidsetAuthApplicationId(long authApplicationId)Sets the value of the Auth-Application-Id AVP, of type Unsigned32.voidsetDestinationHost(DiameterIdentity destinationHost)Sets the value of the Destination-Host AVP, of type DiameterIdentity.voidsetDestinationRealm(DiameterIdentity destinationRealm)Sets the value of the Destination-Realm AVP, of type DiameterIdentity.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.voidsetOriginStateId(long originStateId)Sets the value of the Origin-State-Id AVP, of type Unsigned32.voidsetProxyInfo(ProxyInfo proxyInfo)Sets a single Proxy-Info AVP in the message, of type Grouped.voidsetProxyInfos(ProxyInfo[] proxyInfos)Sets the set of Proxy-Info AVPs, with all the values in the given array.voidsetReAuthRequestType(ReAuthRequestType reAuthRequestType)Sets the value of the Re-Auth-Request-Type AVP, of type Enumerated.voidsetRouteRecord(DiameterIdentity routeRecord)Sets a single Route-Record AVP in the message, of type DiameterIdentity.voidsetRouteRecords(DiameterIdentity[] routeRecords)Sets the set of Route-Record AVPs, with all the values in the given array.voidsetSessionId(String sessionId)Sets the value of the Session-Id AVP, of type UTF8String.voidsetUserName(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, getHeader
-
-
-
-
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:
getSessionIdin 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:
setSessionIdin interfaceDiameterMessage- Throws:
NullPointerException- ifsessionIdisnull.
-
removeSessionId
void removeSessionId()
Removes the Session-Id AVP from the message. If the Session-Id 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:
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.
-
hasDestinationRealm
boolean hasDestinationRealm()
Returns true if the Destination-Realm AVP is present in the message.
-
getDestinationRealm
DiameterIdentity getDestinationRealm()
Returns the value of the Destination-Realm AVP, of type DiameterIdentity.- Specified by:
getDestinationRealmin interfaceDiameterMessage- Returns:
- the value of the Destination-Realm AVP or null if it has not been set on this message
-
setDestinationRealm
void setDestinationRealm(DiameterIdentity destinationRealm)
Sets the value of the Destination-Realm AVP, of type DiameterIdentity.- Specified by:
setDestinationRealmin interfaceDiameterMessage- Throws:
NullPointerException- ifdestinationRealmisnull.
-
removeDestinationRealm
void removeDestinationRealm()
Removes the Destination-Realm AVP from the message. If the Destination-Realm AVP is not present, this method returns silently.
-
hasDestinationHost
boolean hasDestinationHost()
Returns true if the Destination-Host AVP is present in the message.
-
getDestinationHost
DiameterIdentity getDestinationHost()
Returns the value of the Destination-Host AVP, of type DiameterIdentity.- Specified by:
getDestinationHostin interfaceDiameterMessage- Returns:
- the value of the Destination-Host AVP or null if it has not been set on this message
-
setDestinationHost
void setDestinationHost(DiameterIdentity destinationHost)
Sets the value of the Destination-Host AVP, of type DiameterIdentity.- Specified by:
setDestinationHostin interfaceDiameterMessage- Throws:
NullPointerException- ifdestinationHostisnull.
-
removeDestinationHost
void removeDestinationHost()
Removes the Destination-Host AVP from the message. If the Destination-Host AVP is not present, this method returns silently.
-
hasAuthApplicationId
boolean hasAuthApplicationId()
Returns true if the Auth-Application-Id AVP is present in the message.
-
getAuthApplicationId
long getAuthApplicationId()
Returns the value of the Auth-Application-Id AVP, of type Unsigned32. UsehasAuthApplicationId()to check the existence of this AVP.- Returns:
- the value of the Auth-Application-Id AVP
- Throws:
IllegalStateException- if the Auth-Application-Id AVP has not been set on this message
-
setAuthApplicationId
void setAuthApplicationId(long authApplicationId)
Sets the value of the Auth-Application-Id AVP, of type Unsigned32.
-
removeAuthApplicationId
void removeAuthApplicationId()
Removes the Auth-Application-Id AVP from the message. If the Auth-Application-Id AVP is not present, this method returns silently.
-
hasReAuthRequestType
boolean hasReAuthRequestType()
Returns true if the Re-Auth-Request-Type AVP is present in the message.
-
getReAuthRequestType
ReAuthRequestType getReAuthRequestType()
Returns the value of the Re-Auth-Request-Type AVP, of type Enumerated.- Returns:
- the value of the Re-Auth-Request-Type AVP or null if it has not been set on this message
-
setReAuthRequestType
void setReAuthRequestType(ReAuthRequestType reAuthRequestType)
Sets the value of the Re-Auth-Request-Type AVP, of type Enumerated.- Throws:
NullPointerException- ifreAuthRequestTypeisnull.
-
removeReAuthRequestType
void removeReAuthRequestType()
Removes the Re-Auth-Request-Type AVP from the message. If the Re-Auth-Request-Type 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- ifuserNameisnull.
-
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.
-
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- ifproxyInfoisnull.
-
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- ifproxyInfosisnull.
-
removeProxyInfos
void removeProxyInfos()
Removes all Proxy-Info AVPs from the message. If no Proxy-Info AVPs are present, this method returns silently.
-
getRouteRecords
DiameterIdentity[] getRouteRecords()
Returns the set of Route-Record AVPs. The returned array contains the AVPs in the order they appear in the message. A return value of null implies that no Route-Record AVPs have been set. The elements in the given array are DiameterIdentity objects.
-
setRouteRecord
void setRouteRecord(DiameterIdentity routeRecord)
Sets a single Route-Record AVP in the message, of type DiameterIdentity.- Throws:
NullPointerException- ifrouteRecordisnull.
-
setRouteRecords
void setRouteRecords(DiameterIdentity[] routeRecords)
Sets the set of Route-Record 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 getRouteRecords() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
NullPointerException- ifrouteRecordsisnull.
-
removeRouteRecords
void removeRouteRecords()
Removes all Route-Record AVPs from the message. If no Route-Record AVPs are 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.
-
-