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

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

public interface SessionTerminationRequest
extends DiameterMessage

Defines an interface representing the Session-Termination-Request command. From the Diameter Base Protocol (rfc3588.txt) specification:

 8.4.1.  Session-Termination-Request
 
    The Session-Termination-Request (STR), indicated by the Command-Code
    set to 275 and the Command Flags' 'R' bit set, is sent by the access
    device to inform the Diameter Server that an authenticated and/or
    authorized session is being terminated.
 
    Message Format
 
       <Session-Termination-Request> ::= < Diameter Header: 275, REQ, PXY >
                 < Session-Id >
                 { Origin-Host }
                 { Origin-Realm }
                 { Destination-Realm }
                 { Auth-Application-Id }
                 { Termination-Cause }
                 [ User-Name ]
                 [ Destination-Host ]
               * [ Class ]
                 [ Origin-State-Id ]
               * [ Proxy-Info ]
               * [ Route-Record ]
               * [ AVP ]
 


Field Summary
static int commandCode
           
 
Method Summary
 long getAuthApplicationId()
          Returns the value of the Auth-Application-Id AVP, of type Unsigned32.
 byte[][] getClassAvps()
          Returns the set of Class AVPs.
 DiameterIdentityAvp getDestinationHost()
          Returns the value of the Destination-Host AVP, of type DiameterIdentity.
 long getOriginStateId()
          Returns the value of the Origin-State-Id AVP, of type Unsigned32.
 ProxyInfoAvp[] getProxyInfos()
          Returns the set of Proxy-Info AVPs.
 DiameterIdentityAvp[] getRouteRecords()
          Returns the set of Route-Record AVPs.
 TerminationCauseType getTerminationCause()
          Returns the value of the Termination-Cause AVP, of type Enumerated.
 java.lang.String getUserName()
          Returns the value of the User-Name AVP, of type UTF8String.
 boolean hasAuthApplicationId()
          Returns true if the Auth-Application-Id AVP is present in the message.
 boolean hasDestinationHost()
          Returns true if the Destination-Host AVP is present in the message.
 boolean hasDestinationRealm()
          Returns true if the Destination-Realm AVP is present in the message.
 boolean hasOriginStateId()
          Returns true if the Origin-State-Id AVP is present in the message.
 boolean hasTerminationCause()
          Returns true if the Termination-Cause AVP is present in the message.
 boolean hasUserName()
          Returns true if the User-Name AVP is present in the message.
 void setAuthApplicationId(long authApplicationId)
          Sets the value of the Auth-Application-Id AVP, of type Unsigned32.
 void setClassAvp(byte[] classAvp)
          Sets a single Class AVP in the message, of type OctetString.
 void setClassAvps(byte[][] classAvps)
          Sets the set of Class AVPs, with all the values in the given array.
 void setDestinationHost(DiameterIdentityAvp destinationHost)
          Sets the value of the Destination-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 a single Proxy-Info AVP in the message, of type Grouped.
 void setProxyInfos(ProxyInfoAvp[] proxyInfos)
          Sets the set of Proxy-Info AVPs, with all the values in the given array.
 void setRouteRecord(DiameterIdentityAvp routeRecord)
          Sets a single Route-Record AVP in the message, of type DiameterIdentity.
 void setRouteRecords(DiameterIdentityAvp[] routeRecords)
          Sets the set of Route-Record AVPs, with all the values in the given array.
 void setTerminationCause(TerminationCauseType terminationCause)
          Sets the value of the Termination-Cause AVP, of type Enumerated.
 void setUserName(java.lang.String userName)
          Sets the value of the User-Name AVP, of type UTF8String.
 
Methods inherited from interface net.java.slee.resource.diameter.base.events.DiameterMessage
clone, getAvps, getCommand, getDestinationRealm, getExtensionAvps, getHeader, getOriginHost, getOriginRealm, getSessionId, hasOriginHost, hasOriginRealm, hasSessionId, setDestinationRealm, setExtensionAvps, setOriginHost, setOriginRealm, setSessionId
 

Field Detail

commandCode

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

hasDestinationRealm

boolean hasDestinationRealm()
Returns true if the Destination-Realm AVP is present in the message.


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

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

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

hasTerminationCause

boolean hasTerminationCause()
Returns true if the Termination-Cause AVP is present in the message.


getTerminationCause

TerminationCauseType getTerminationCause()
Returns the value of the Termination-Cause AVP, of type Enumerated.

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

setTerminationCause

void setTerminationCause(TerminationCauseType terminationCause)
Sets the value of the Termination-Cause AVP, of type Enumerated.

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

hasUserName

boolean hasUserName()
Returns true if the User-Name AVP is present in the message.


getUserName

java.lang.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(java.lang.String userName)
Sets the value of the User-Name AVP, of type UTF8String.

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

hasDestinationHost

boolean hasDestinationHost()
Returns true if the Destination-Host AVP is present in the message.


getDestinationHost

DiameterIdentityAvp getDestinationHost()
Returns the value of the Destination-Host AVP, of type DiameterIdentity.

Specified by:
getDestinationHost in interface DiameterMessage
Returns:
the value of the Destination-Host AVP or null if it has not been set on this message

setDestinationHost

void setDestinationHost(DiameterIdentityAvp destinationHost)
Sets the value of the Destination-Host AVP, of type DiameterIdentity.

Specified by:
setDestinationHost in interface DiameterMessage
Throws:
java.lang.IllegalStateException - if setDestinationHost has already been called

getClassAvps

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


setClassAvp

void setClassAvp(byte[] classAvp)
Sets a single Class AVP in the message, of type OctetString.

Throws:
java.lang.IllegalStateException - if setClassAvp or setClassAvps has already been called

setClassAvps

void setClassAvps(byte[][] classAvps)
Sets the set of Class 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 getClassAvps() is not guaranteed to return the same array instance, e.g. an "==" check would fail.

Throws:
java.lang.IllegalStateException - if setClassAvp or setClassAvps 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

getProxyInfos

ProxyInfoAvp[] 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(ProxyInfoAvp proxyInfo)
Sets a single Proxy-Info AVP in the message, of type Grouped.

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

setProxyInfos

void setProxyInfos(ProxyInfoAvp[] 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:
java.lang.IllegalStateException - if setProxyInfo or setProxyInfos has already been called

getRouteRecords

DiameterIdentityAvp[] 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(DiameterIdentityAvp routeRecord)
Sets a single Route-Record AVP in the message, of type DiameterIdentity.

Throws:
java.lang.IllegalStateException - if setRouteRecord or setRouteRecords has already been called

setRouteRecords

void setRouteRecords(DiameterIdentityAvp[] 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:
java.lang.IllegalStateException - if setRouteRecord or setRouteRecords has already been called


Copyright © 2008. All Rights Reserved.