uk.org.ogsadai.sessions.impl
Class TransientSessionConfiguration

java.lang.Object
  |
  +--uk.org.ogsadai.sessions.impl.TransientSessionConfiguration
All Implemented Interfaces:
SessionConfiguration

public class TransientSessionConfiguration
extends java.lang.Object
implements SessionConfiguration

Class representing the configuration of a TransientSession.

Author:
The OGSA-DAI Project Team
See Also:
SessionConfiguration

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
           
private static DAILogger LOG
           
private  long mDefaultTimeout
           
private  ResourceEventDispatcher mDispatcher
           
private  long mMaxTimeout
           
private  Properties mProperties
           
private  java.util.Set mStaticAttributes
           
 
Constructor Summary
TransientSessionConfiguration(long defaultTimeout, long maxTimeout, java.util.Set attributes, Properties properties, DataResourceAccessor dataResource)
          Creates a new configuration object with the specified settings.
 
Method Summary
 long getDefaultTimeout()
          Gets the default timeout value for new sessions in milliseconds.
 ResourceEventDispatcher getDispatcher()
          Gets the data service resource event dispatcher for events relating to sessions.
 long getMaxTimeout()
          Gets the maximum timeout value for new sessions.
 Properties getResourceProperties()
          Gets the resource properties that should be added to each new session created by the session manager.
 java.util.Set getStaticSessionAttributes()
          Returns the set of static session attributes that should be added to every new session created by the session manager configured with this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
See Also:
Constant Field Values

LOG

private static final DAILogger LOG

mDefaultTimeout

private final long mDefaultTimeout

mMaxTimeout

private final long mMaxTimeout

mStaticAttributes

private final java.util.Set mStaticAttributes

mProperties

private final Properties mProperties

mDispatcher

private final ResourceEventDispatcher mDispatcher
Constructor Detail

TransientSessionConfiguration

public TransientSessionConfiguration(long defaultTimeout,
                                     long maxTimeout,
                                     java.util.Set attributes,
                                     Properties properties,
                                     DataResourceAccessor dataResource)
Creates a new configuration object with the specified settings.

Parameters:
defaultTimeout - Default timeout for new sessions.
maxTimeout - Maximum timeout for new sessions.
attributes - Static session attribute set for new sessions.
properties - Data service resource properties.
dataResource - Data resource which needs to be informed of session events.
Method Detail

getDefaultTimeout

public long getDefaultTimeout()
Description copied from interface: SessionConfiguration
Gets the default timeout value for new sessions in milliseconds.

This is the number of milliseconds that a session will take to timeout after its last participant has left. This must be less than or equal to the value of getMaxTimeout().

Specified by:
getDefaultTimeout in interface SessionConfiguration
Returns:
long value greater than zero

getMaxTimeout

public long getMaxTimeout()
Description copied from interface: SessionConfiguration
Gets the maximum timeout value for new sessions.

Specified by:
getMaxTimeout in interface SessionConfiguration
Returns:
milliseconds value as a long or -1 if no value is set.

getStaticSessionAttributes

public java.util.Set getStaticSessionAttributes()
Description copied from interface: SessionConfiguration
Returns the set of static session attributes that should be added to every new session created by the session manager configured with this object.

If there are no static session attributes then an empty set is returned.

Specified by:
getStaticSessionAttributes in interface SessionConfiguration
Returns:
an immutable set of SessionAttribute objects where each instance has a unique name.

getResourceProperties

public Properties getResourceProperties()
Description copied from interface: SessionConfiguration
Gets the resource properties that should be added to each new session created by the session manager.

Specified by:
getResourceProperties in interface SessionConfiguration
Returns:
a reference to the data service resource Properties object.

getDispatcher

public ResourceEventDispatcher getDispatcher()
Description copied from interface: SessionConfiguration
Gets the data service resource event dispatcher for events relating to sessions.

Specified by:
getDispatcher in interface SessionConfiguration
Returns:
a ResourceEventDispatcher object