java.lang.Object
org.tentackle.task.AbstractTask
org.tentackle.session.AbstractSessionTask
- All Implemented Interfaces:
Serializable
,Comparable<Task>
,Runnable
,SessionDependable
,SessionProvider
,Task
A task being executed by the
SessionTaskDispatcher
.- Author:
- harald
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the db the runnable must use.boolean
Returns whether the session is immutable.void
setSession
(Session session) Sets the db.
Done bySessionTaskDispatcher
.void
setSessionImmutable
(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, toString
-
Constructor Details
-
AbstractSessionTask
public AbstractSessionTask()Parent constructor.
-
-
Method Details
-
setSession
Sets the db.
Done bySessionTaskDispatcher
.- Specified by:
setSession
in interfaceSessionDependable
- Parameters:
session
- the session
-
getSession
Gets the db the runnable must use.- Specified by:
getSession
in interfaceSessionProvider
- Returns:
- the db
-
setSessionImmutable
public void setSessionImmutable(boolean sessionImmutable) Description copied from interface:SessionDependable
Sets the session to immutable.- Specified by:
setSessionImmutable
in interfaceSessionDependable
- Parameters:
sessionImmutable
- true if session cannot be changed anymore
-
isSessionImmutable
public boolean isSessionImmutable()Description copied from interface:SessionDependable
Returns whether the session is immutable.- Specified by:
isSessionImmutable
in interfaceSessionDependable
- Returns:
- true if immutable
-