VLab Common 1.2

pl.psnc.vlab.management.session
Class SessionManager

java.lang.Object
  extended by pl.psnc.vlab.management.session.SessionManager
All Implemented Interfaces:
LongTask

public class SessionManager
extends java.lang.Object
implements LongTask

Session manager is responsible for managing user rights, checking timeouts. If the session expires the manager will perform the clean up and close the application

Author:
Dominik Stoklosa (~osa~)
Email address
osa@man.poznan.pl

Constructor Summary
SessionManager(SessionError sessionError)
          Creates a new instance of SessionManager
 
Method Summary
 boolean exceptionThrown()
          Indicates whether the Long Task has thrown an exception
 java.lang.Exception getException()
          Each exception which is cought during task execution will be returned by this method.
 int getProgress()
          Gets the current state of the executed task
 java.lang.Object getResult()
          Returns an object produced by the executed task.
 int getTaskLength()
          Gets the length of the task
 boolean isDone()
          Tells whether am executed task has been completed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionManager

public SessionManager(SessionError sessionError)
Creates a new instance of SessionManager

Parameters:
sessionError - the SessionError object contains the behavior when an exception occurs
Method Detail

getTaskLength

public int getTaskLength()
Gets the length of the task

Specified by:
getTaskLength in interface LongTask
Returns:
the length of the current task

getProgress

public int getProgress()
Gets the current state of the executed task

Specified by:
getProgress in interface LongTask
Returns:
the current state of the executed task (where getTaskLength() is max size

isDone

public boolean isDone()
Tells whether am executed task has been completed

Specified by:
isDone in interface LongTask
Returns:
true/false

getResult

public java.lang.Object getResult()
Returns an object produced by the executed task. Usually it will be the value returned by the method executed in separate thread. If no value is produced the null value will be returned

Specified by:
getResult in interface LongTask
Returns:
the result object produced by the current thread.If no value is produced the null value will be returned

getException

public java.lang.Exception getException()
Each exception which is cought during task execution will be returned by this method.

Specified by:
getException in interface LongTask
Returns:
exception object or null if no exception has been thrown

exceptionThrown

public boolean exceptionThrown()
Indicates whether the Long Task has thrown an exception

Specified by:
exceptionThrown in interface LongTask
Returns:
true if exception has been thrown, false otherwise

VLab Common 1.2

Copyright 2004 by VLAB Dominik Stoklosa.