org.yawlfoundation.yawl.authentication
Class YSession

java.lang.Object
  extended by org.yawlfoundation.yawl.authentication.YSession
Direct Known Subclasses:
YExternalSession, YServiceSession

public class YSession
extends Object

Base class which represents an active session between the engine and an external service or application.

Since:
2.1
Author:
Michael Adams

Constructor Summary
protected YSession(long timeOutSeconds)
          Creates an anonymous session with the engine.
  YSession(YClient client, long timeOutSeconds)
          Creates a session with the engine for the client.
 
Method Summary
 void cancelActivityTimer()
           
 YClient getClient()
           
 String getHandle()
           
 String getPassword()
          Overridden in all child classes.
 String getURI()
          Overridden in all child classes.
 void refresh()
          Resets the idle timer for this session.
 void setPassword(String password)
          Overridden in all child classes.
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YSession

protected YSession(long timeOutSeconds)
Creates an anonymous session with the engine.

Parameters:
timeOutSeconds - the maximum idle time for this session (in seconds). A value of 0 will default to 60 minutes; a value less than zero means this session will never timeout.

YSession

public YSession(YClient client,
                long timeOutSeconds)
Creates a session with the engine for the client.

Parameters:
client - the external service or application requesting a session
timeOutSeconds - the maximum idle time for this session (in seconds)
See Also:
YSession(long)
Method Detail

getURI

public String getURI()
Overridden in all child classes.

Returns:
This base version returns a null String (always)

getPassword

public String getPassword()
Overridden in all child classes.

Returns:
This base version returns a null String (always)

setPassword

public void setPassword(String password)
                 throws YPersistenceException
Overridden in all child classes. This base version sets the password for the generic 'admin' user only.

Parameters:
password - the (hashed) password to set (change to) for the 'admin' user.
Throws:
YPersistenceException

getClient

public YClient getClient()

getHandle

public String getHandle()

refresh

public void refresh()
Resets the idle timer for this session.


shutdown

public void shutdown()

cancelActivityTimer

public void cancelActivityTimer()


Copyright © 2004-2012 The YAWL Foundation.