/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: SessionNotification.java,v 1.2 2008/06/25 05:41:31 qcheng Exp $
*
*/
/**
* Portions Copyrighted [2011] [ForgeRock AS]
*/
/**
* This <code>SessionNotification</code> class represents a
* <code>SessionNotification</code> XML document. The
* <code>SessionNotification</code> DTD is defined as the following:
* </p>
*
* <pre>
* <?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)>
* ]>
* </pre>
*
* </p>
*/
public class SessionNotification {
private int notificationType;
private long notificationTime;
/*
* Constructors
*/
/**
* This constructor shall only be used at the server side to construct a
* <code>SessionNotification</code> object.
*
* @param info The session information.
* @param type The session event type.
* @param time The session event time.
*/
sessionInfo = info;
}
/*
* This constructor is used by <code>SessionNotificationParser</code> to
* reconstruct a <code>SessionNotification</code> object.
*/
}
/**
* This method is used primarily at the server side to reconstruct a
* <code>SessionNotification</code> object based on the XML document
* received from client. The DTD of this XML document is described above.
*
* @param xml The <code>SessionNotification</code> XML document String.
*/
}
/**
* Sets the notification version.
*
* @param version Notification version.
*/
}
/**
* Returns the notification version.
*
* @return The notification version.
*/
return notificationVersion;
}
/**
* Sets the notification ID.
*
* @param id Notification ID.
*/
notificationID = id;
}
/**
* Returns the notification ID.
*
* @return The notification ID.
*/
return notificationID;
}
/**
* Sets the session information.
*
* @param info The session information.
*/
sessionInfo = info;
}
/**
* Returns the session information.
*
* @return The session information.
*/
return sessionInfo;
}
/**
* Sets the notification type.
*
* @param type Session type.
*/
}
/**
* Returns the notification type.
*
* @return Notification type.
*/
public int getNotificationType() {
return notificationType;
}
/**
* Sets the notification time.
*
* @param time notification time.
*/
}
/**
* Returns the notification time.
*
* @return Session notification time.
*/
public long getNotificationTime() {
return notificationTime;
}
/**
* Translates the notification to an XML document String based
* on the <code>SessionNotification</code> DTD described above.
*
* @return An XML String representing the notification.
*/
NL);
}
}