Class SessionNotification


  • public class SessionNotification
    extends Object
    This SessionNotification class represents a SessionNotification XML document. The SessionNotification DTD 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 Detail

      • SessionNotification

        public SessionNotification​(SessionInfo info,
                                   int type,
                                   long time)
        This constructor shall only be used at the server side to construct a SessionNotification object.
        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 a SessionNotification object based on the XML document received from client. The DTD of this XML document is described above.
        Parameters:
        xml - The SessionNotification XML 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 the SessionNotification DTD described above.
        Returns:
        An XML String representing the notification.