public class SingleTaskSession extends AbstractSession
Session
implementation that accepts one request, processes it and exits.AbstractSession.CloseReason
Modifier and Type | Field and Description |
---|---|
protected SessionTask |
onlySessionTask |
aliasesUsedBySession, closeReason, graphManager, maintainStateAfterException, sessions, sessionTaskStarted, sessionThread
evalOpTimer, traversalOpTimer
Constructor and Description |
---|
SingleTaskSession(SessionTask onlySessionTask,
String sessionId,
ConcurrentMap<String,Session> sessions)
Constructs a
SingleTaskSession that has the task to execute supplied on construction. |
Modifier and Type | Method and Description |
---|---|
boolean |
isAcceptingTasks()
The
SingleWorker can only process one request so the initial construction of it already has the
request in it and no more can be added, therefore this method always return false . |
void |
run() |
void |
sendTimeoutResponseForUncommencedTask()
Respond to the client with the specific timeout response for this Session implementation.
|
boolean |
submitTask(SessionTask sessionTask)
This implementation only take a single
SessionTask on construction - no additional tasks can be
submitted. |
String |
toString() |
cancel, close, closeTransaction, closeTransaction, closeTransactionSafely, closeTransactionSafely, determineIfSpecialException, fromBytecode, fromScript, generateResponseMetaData, generateStatusAttributes, getActualTimeoutLengthWhenClosed, getCloseReason, getScriptEngine, getSessionId, getWorkerBindings, handleException, handleGraphOperation, handleIterator, isBoundTo, isTransactionManaged, iterateComplete, makeFrame, mergeBindingsFromRequest, process, setSessionCancelFuture, setSessionFuture, startTransaction, triggerTimeout
protected final SessionTask onlySessionTask
public SingleTaskSession(SessionTask onlySessionTask, String sessionId, ConcurrentMap<String,Session> sessions)
SingleTaskSession
that has the task to execute supplied on construction.public boolean isAcceptingTasks()
SingleWorker
can only process one request so the initial construction of it already has the
request in it and no more can be added, therefore this method always return false
.public void sendTimeoutResponseForUncommencedTask()
AbstractSession
sendTimeoutResponseForUncommencedTask
in class AbstractSession
public boolean submitTask(SessionTask sessionTask) throws RejectedExecutionException
SessionTask
on construction - no additional tasks can be
submitted.RejectedExecutionException
- if the task cannot be queuedpublic void run()
Copyright © 2013–2023 Apache Software Foundation. All rights reserved.