Package com.iplanet.dpro.session.share
Class SessionRequest
- java.lang.Object
-
- com.iplanet.dpro.session.share.SessionRequest
-
public class SessionRequest extends Object
ThisSessionRequestclass represents aSessionRequestXML document. TheSessionRequestDTD 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)> ]>
-
-
Field Summary
Fields Modifier and Type Field Description static intAddSessionListenerstatic intDestroySessionstatic intGetSessionstatic intGetSessionCountstatic intGetValidSessionsstatic intLogoutstatic intSetProperty
-
Constructor Summary
Constructors Constructor Description SessionRequest(int method, String sid, boolean reset)This constructor shall only be used at the client side to construct aSessionRequestobject.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDestroySessionID()Returns the ID of the session to be destroyed.intgetMethodID()Returns the method ID.StringgetMethodName()StringgetNotificationURL()Returns the notification URL.StringgetPattern()Returns the pattern value.StringgetPropertyName()Returns the property name.StringgetPropertyValue()Returns the property value.StringgetRequester()Returns the requesterStringgetRequestID()Returns the request ID.StringgetRequestVersion()Returns the request version.booleangetResetFlag()Returns the reset flag.StringgetSessionID()Returns the session ID.StringgetUUID()Returns the universal unique identifierstatic SessionRequestparseXML(String xml)This method is used primarily at the server side to reconstruct aSessionRequestobject based on the XML document received from client.voidsetDestroySessionID(String id)Sets the ID of the session to be destroyed.voidsetNotificationURL(String url)Sets the notification URL.voidsetPattern(String value)Sets the pattern value.voidsetPropertyName(String name)Sets the property name.voidsetPropertyValue(String value)Sets the property value.voidsetRequester(String requester)Sets the requester.voidsetUUID(String id)Sets the universal unique identifier.StringtoXMLString()This method translates the request to an XML document String based on theSessionRequestDTD described above.
-
-
-
Field Detail
-
GetSession
public static final int GetSession
- See Also:
- Constant Field Values
-
GetValidSessions
public static final int GetValidSessions
- See Also:
- Constant Field Values
-
DestroySession
public static final int DestroySession
- See Also:
- Constant Field Values
-
Logout
public static final int Logout
- See Also:
- Constant Field Values
-
AddSessionListener
public static final int AddSessionListener
- See Also:
- Constant Field Values
-
SetProperty
public static final int SetProperty
- See Also:
- Constant Field Values
-
GetSessionCount
public static final int GetSessionCount
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SessionRequest
public SessionRequest(int method, String sid, boolean reset)This constructor shall only be used at the client side to construct aSessionRequestobject.- Parameters:
method- The method ID of theSessionRequest.sid- The session ID required by theSessionRequest.reset- The flag to indicate whether this request needs to update the latest session access time.
-
-
Method Detail
-
parseXML
public static SessionRequest parseXML(String xml)
This method is used primarily at the server side to reconstruct aSessionRequestobject based on the XML document received from client. The DTD of this XML document is described above.- Parameters:
xml- TheSessionRequestXML document String.- Returns:
SessionRequestobject.
-
getRequestVersion
public String getRequestVersion()
Returns the request version.- Returns:
- The request version.
-
getRequestID
public String getRequestID()
Returns the request ID.- Returns:
- The request ID.
-
getMethodID
public int getMethodID()
Returns the method ID.- Returns:
- The method ID.
-
getMethodName
public String getMethodName()
- Returns:
- The method name.
-
getSessionID
public String getSessionID()
Returns the session ID.- Returns:
- Session ID.
-
setRequester
public void setRequester(String requester)
Sets the requester.- Parameters:
requester- Session requester.
-
getRequester
public String getRequester()
Returns the requester- Returns:
- id Session requester.
-
getResetFlag
public boolean getResetFlag()
Returns the reset flag.- Returns:
- The reset flag.
-
setDestroySessionID
public void setDestroySessionID(String id)
Sets the ID of the session to be destroyed.- Parameters:
id- The ID of the session to be destroyed.
-
getDestroySessionID
public String getDestroySessionID()
Returns the ID of the session to be destroyed.- Returns:
- The ID of the session to be destroyed.
-
setNotificationURL
public void setNotificationURL(String url)
Sets the notification URL.- Parameters:
url- The notification URL.
-
getNotificationURL
public String getNotificationURL()
Returns the notification URL.- Returns:
- The notification URL.
-
setPropertyName
public void setPropertyName(String name)
Sets the property name.- Parameters:
name- The property name.
-
getPropertyName
public String getPropertyName()
Returns the property name.- Returns:
- The property name.
-
setPropertyValue
public void setPropertyValue(String value)
Sets the property value.- Parameters:
value- The property value.
-
getPropertyValue
public String getPropertyValue()
Returns the property value.- Returns:
- The property value.
-
setPattern
public void setPattern(String value)
Sets the pattern value. Process escape chars in pattern withCDATA.- Parameters:
value- The pattern value.
-
getPattern
public String getPattern()
Returns the pattern value.- Returns:
- The pattern value.
-
setUUID
public void setUUID(String id)
Sets the universal unique identifier.- Parameters:
id- The universal unique identifier.
-
getUUID
public String getUUID()
Returns the universal unique identifier- Returns:
- The universal unique identifier
-
toXMLString
public String toXMLString()
This method translates the request to an XML document String based on theSessionRequestDTD described above. The ID of the session to be destroyed has to be set for methodDestroySession. The notification URL has to be set for both methodsAddSessionListenerandAddSessionListenerOnAllSessions. otherwise, the returnsnull.- Returns:
- An XML String representing the request.
-
-