- java.lang.Object
-
- org.tentackle.task.AbstractTask
-
- org.tentackle.session.AbstractSessionTask
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<org.tentackle.task.Task>,java.lang.Runnable,SessionDependable,SessionProvider,org.tentackle.task.Task
public abstract class AbstractSessionTask extends org.tentackle.task.AbstractTask implements SessionDependable
A task being executed by theSessionTaskDispatcher.- Author:
- harald
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractSessionTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SessiongetSession()Gets the db the runnable must use.booleanisSessionImmutable()Returns whether the session is immutable.voidsetSession(Session session)Sets the db.
Done bySessionTaskDispatcher.voidsetSessionImmutable(boolean sessionImmutable)Sets the session to immutable.-
Methods inherited from class org.tentackle.task.AbstractTask
addTaskListener, compareTo, equals, fireCompleted, fireStarted, getCause, getCompleted, getDispatcher, getId, getRepeatInterval, getResult, getScheduledEpochalTime, getStarted, hashCode, isInterruptable, removeTaskListener, setCause, setCompleted, setDispatcher, setId, setRepeatInterval, setResult, setScheduledEpochalTime, setStarted
-
-
-
-
Method Detail
-
setSession
public void setSession(Session session)
Sets the db.
Done bySessionTaskDispatcher.- Specified by:
setSessionin interfaceSessionDependable- Parameters:
session- the session
-
getSession
public Session getSession()
Gets the db the runnable must use.- Specified by:
getSessionin interfaceSessionProvider- Returns:
- the db
-
setSessionImmutable
public void setSessionImmutable(boolean sessionImmutable)
Description copied from interface:SessionDependableSets the session to immutable.- Specified by:
setSessionImmutablein interfaceSessionDependable- Parameters:
sessionImmutable- true if session cannot be changed anymore
-
isSessionImmutable
public boolean isSessionImmutable()
Description copied from interface:SessionDependableReturns whether the session is immutable.- Specified by:
isSessionImmutablein interfaceSessionDependable- Returns:
- true if immutable
-
-