uk.org.ogsadai.sessions
Class SessionSettings

java.lang.Object
  |
  +--uk.org.ogsadai.sessions.SessionSettings

public class SessionSettings
extends java.lang.Object

Encapsulates the settings of a session.

These are composed of:

Author:
The OGSA-DAI Project Team

Field Summary
private static?java.lang.String COPYRIGHT_NOTICE
??????????Copyright statement
private static?DAILogger LOG
??????????Logger object for this class
private ?SessionID mSessionID
??????????Unique identifier for the session
private ?long mTimeout
??????????Timeout length in milliseconds or TIME_NOT_SET
static?long TIME_NOT_SET
??????????Special value to indicate that a time setting is not specified.
?
Constructor Summary
SessionSettings(long?timeout)
??????????Creates a new session settings object with the specified timeout.
?
Method Summary
?boolean equals(java.lang.Object?obj)
??????????Returns true if and only if the parameter is a SessionSettings object with an equal session ID and timeout value.
?SessionID getSessionID()
??????????Retrieves the session identifier setting from this object.
?long getTimeout()
??????????Gets the time in milliseconds that the session is due to expire.
?boolean hasTimeout()
??????????Returns true if a timeout has been set to 0 or more, or false if the timeout is TIME_NOT_SET.
?java.lang.String toString()
??????????Returns a string of XML data describing the session settings.
?
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
?

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

LOG

private static final DAILogger LOG
Logger object for this class


TIME_NOT_SET

public static final long TIME_NOT_SET
Special value to indicate that a time setting is not specified.

See Also:
Constant Field Values

mSessionID

private SessionID mSessionID
Unique identifier for the session


mTimeout

private long mTimeout
Timeout length in milliseconds or TIME_NOT_SET

Constructor Detail

SessionSettings

public SessionSettings(long?timeout)
Creates a new session settings object with the specified timeout. A new session ID will be generated automatically.

Parameters:
timeout - The number of milliseconds that the session will live for after the last session participant leaves it, or SessionID.TIME_NOT_SET if there is no timeout.
Method Detail

hasTimeout

public boolean hasTimeout()
Returns true if a timeout has been set to 0 or more, or false if the timeout is TIME_NOT_SET.

Returns:
boolean flag.

getTimeout

public long getTimeout()
Gets the time in milliseconds that the session is due to expire. This is measured from midnight, January 1, 1970 UTC.

Returns:
timeout.

getSessionID

public SessionID getSessionID()
Retrieves the session identifier setting from this object.

Returns:
session ID.

equals

public boolean equals(java.lang.Object?obj)
Returns true if and only if the parameter is a SessionSettings object with an equal session ID and timeout value.

Overrides:
equals in class java.lang.Object
Returns:
boolean flag.

toString

public java.lang.String toString()
Returns a string of XML data describing the session settings.

This takes the form:

 
   mySessionID
   12345678
 
 

Overrides:
toString in class java.lang.Object