Package com.iplanet.dpro.session.share
Class SessionNotification
- java.lang.Object
-
- com.iplanet.dpro.session.share.SessionNotification
-
public class SessionNotification extends Object
ThisSessionNotificationclass represents aSessionNotificationXML document. TheSessionNotificationDTD is defined as the following:<?xml version="1.0"> < !DOCTYPE SessionNotification [ < !ELEMENT SessionNotification (Session, Type, Time)> < !ATTLIST SessionNotification vers CDATA #REQUIRED notid CDATA #REQUIRED> < !ELEMENT Session> < !ATTLIST Session sid CDATA #REQUIRED stype (user|application) "user" cid CDATA #REQUIRED cdomain CDATA #REQUIRED maxtime CDATA #REQUIRED maxidle CDATA #REQUIRED maxcaching CDATA #REQUIRED timeleft CDATA #REQUIRED timeidle CDATA #REQUIRED state (invalid|valid|inactive|destroyed) "invalid"> < !ELEMENT Type (creation|idle|max|logout|reactivation|destroy) "creation"> < !ELEMENT Time (#PCDATA)> ]>
-
-
Constructor Summary
Constructors Constructor Description SessionNotification(SessionInfo info, int type, long time)This constructor shall only be used at the server side to construct aSessionNotificationobject.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetNotificationID()Returns the notification ID.longgetNotificationTime()Returns the notification time.intgetNotificationType()Returns the notification type.StringgetNotificationVersion()Returns the notification version.SessionInfogetSessionInfo()Returns the session information.static SessionNotificationparseXML(String xml)This method is used primarily at the server side to reconstruct aSessionNotificationobject based on the XML document received from client.StringtoXMLString()Translates the notification to an XML document String based on theSessionNotificationDTD described above.
-
-
-
Constructor Detail
-
SessionNotification
public SessionNotification(SessionInfo info, int type, long time)
This constructor shall only be used at the server side to construct aSessionNotificationobject.- Parameters:
info- The session information.type- The session event type.time- The session event time.
-
-
Method Detail
-
parseXML
public static SessionNotification parseXML(String xml)
This method is used primarily at the server side to reconstruct aSessionNotificationobject based on the XML document received from client. The DTD of this XML document is described above.- Parameters:
xml- TheSessionNotificationXML document String.
-
getNotificationVersion
public String getNotificationVersion()
Returns the notification version.- Returns:
- The notification version.
-
getNotificationID
public String getNotificationID()
Returns the notification ID.- Returns:
- The notification ID.
-
getSessionInfo
public SessionInfo getSessionInfo()
Returns the session information.- Returns:
- The session information.
-
getNotificationType
public int getNotificationType()
Returns the notification type.- Returns:
- Notification type.
-
getNotificationTime
public long getNotificationTime()
Returns the notification time.- Returns:
- Session notification time.
-
toXMLString
public String toXMLString()
Translates the notification to an XML document String based on theSessionNotificationDTD described above.- Returns:
- An XML String representing the notification.
-
-