public class SessionRequest extends Object
SessionRequest
class represents a
SessionRequest
XML document. The SessionRequest
DTD is defined as the following:
<?xml version="1.0"> < !DOCTYPE SessionRequest [ < !ELEMENT SessionRequest (GetSession | GetValidSessions | DestroySession | Logout | AddSessionListener | AddSessionListenerOnAllSessions | SetProperty | GetSessionCount)> < !ATTLIST SessionRequest vers CDATA #REQUIRED reqid CDATA #REQUIRED> < !-- This attribute carries the requester identity info --> requester CDATA #IMPLIED> < !ELEMENT GetSession (SessionID)> < !-- This attribute indicates whether resets the latest access time --> reset CDATA #REQUIRED> < !ELEMENT GetValidSessions (SessionID Pattern?)> < !ELEMENT DestroySession (SessionID, DestroySessionID)> < !ELEMENT Logout (SessionID)> < !ELEMENT AddSessionListener (SessionID, URL)> < !ELEMENT AddSessionListenerOnAllSessions (SessionID, URL)> < !ELEMENT SetProperty (SessionID, Property)> < !ATTLIST Property name CDATA #REQUIRED value CDATA #REQUIRED> < !ELEMENT SessionID (#PCDATA)> < !ELEMENT DestroySessionID (#PCDATA)> < !ELEMENT URL (#PCDATA)> < !ELEMENT GetSessionCount (SessionID, UUID)> < !ELEMENT UUID (#PCDATA)> < !ELEMENT Pattern (#PCDATA)> ]>
Modifier and Type | Field and Description |
---|---|
static int |
AddSessionListener |
static int |
DestroySession |
static int |
GetSession |
static int |
GetSessionCount |
static int |
GetValidSessions |
static int |
Logout |
static int |
SetProperty |
Constructor and Description |
---|
SessionRequest(int method,
String sid,
boolean reset)
This constructor shall only be used at the client side to construct a
SessionRequest object. |
Modifier and Type | Method and Description |
---|---|
String |
getDestroySessionID()
Returns the ID of the session to be destroyed.
|
int |
getMethodID()
Returns the method ID.
|
String |
getMethodName() |
String |
getNotificationURL()
Returns the notification URL.
|
String |
getPattern()
Returns the pattern value.
|
String |
getPropertyName()
Returns the property name.
|
String |
getPropertyValue()
Returns the property value.
|
String |
getRequester()
Returns the requester
|
String |
getRequestID()
Returns the request ID.
|
String |
getRequestVersion()
Returns the request version.
|
boolean |
getResetFlag()
Returns the reset flag.
|
String |
getSessionID()
Returns the session ID.
|
String |
getUUID()
Returns the universal unique identifier
|
static SessionRequest |
parseXML(String xml)
This method is used primarily at the server side to reconstruct a
SessionRequest object based on the XML document received
from client. |
void |
setDestroySessionID(String id)
Sets the ID of the session to be destroyed.
|
void |
setNotificationURL(String url)
Sets the notification URL.
|
void |
setPattern(String value)
Sets the pattern value.
|
void |
setPropertyName(String name)
Sets the property name.
|
void |
setPropertyValue(String value)
Sets the property value.
|
void |
setRequester(String requester)
Sets the requester.
|
void |
setUUID(String id)
Sets the universal unique identifier.
|
String |
toXMLString()
This method translates the request to an XML document String based on the
SessionRequest DTD described above. |
public static final int GetSession
public static final int GetValidSessions
public static final int DestroySession
public static final int Logout
public static final int AddSessionListener
public static final int SetProperty
public static final int GetSessionCount
public SessionRequest(int method, String sid, boolean reset)
SessionRequest
object.method
- The method ID of the SessionRequest
.sid
- The session ID required by the SessionRequest
.reset
- The flag to indicate whether this request needs to update
the latest session access time.public static SessionRequest parseXML(String xml)
SessionRequest
object based on the XML document received
from client. The DTD of this XML document is described above.xml
- The SessionRequest
XML document String.SessionRequest
object.public String getRequestVersion()
public String getRequestID()
public int getMethodID()
public String getMethodName()
public String getSessionID()
public void setRequester(String requester)
requester
- Session requester.public String getRequester()
public boolean getResetFlag()
public void setDestroySessionID(String id)
id
- The ID of the session to be destroyed.public String getDestroySessionID()
public void setNotificationURL(String url)
url
- The notification URL.public String getNotificationURL()
public void setPropertyName(String name)
name
- The property name.public String getPropertyName()
public void setPropertyValue(String value)
value
- The property value.public String getPropertyValue()
public void setPattern(String value)
CDATA
.value
- The pattern value.public String getPattern()
public void setUUID(String id)
id
- The universal unique identifier.public String getUUID()
public String toXMLString()
SessionRequest
DTD described above. The ID of the session
to be destroyed has to be set for method DestroySession
.
The notification URL has to be set for both methods
AddSessionListener
and
AddSessionListenerOnAllSessions
. otherwise, the returns
null
.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.