Class SingleTaskSession
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.server.handler.AbstractSession
- 
- org.apache.tinkerpop.gremlin.server.handler.SingleTaskSession
 
 
- 
- All Implemented Interfaces:
- AutoCloseable,- Runnable,- Session
 
 public class SingleTaskSession extends AbstractSession A simpleSessionimplementation that accepts one request, processes it and exits.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.tinkerpop.gremlin.server.handler.AbstractSessionAbstractSession.CloseReason
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected SessionTaskonlySessionTask- 
Fields inherited from class org.apache.tinkerpop.gremlin.server.handler.AbstractSessionaliasesUsedBySession, closeReason, graphManager, maintainStateAfterException, sessions, sessionTaskStarted, sessionThread
 - 
Fields inherited from interface org.apache.tinkerpop.gremlin.server.handler.SessionevalOpTimer, traversalOpTimer
 
- 
 - 
Constructor SummaryConstructors Constructor Description SingleTaskSession(SessionTask onlySessionTask, String sessionId, ConcurrentMap<String,Session> sessions)Constructs aSingleTaskSessionthat has the task to execute supplied on construction.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAcceptingTasks()TheSingleWorkercan 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 returnfalse.voidrun()voidsendTimeoutResponseForUncommencedTask()Respond to the client with the specific timeout response for this Session implementation.booleansubmitTask(SessionTask sessionTask)This implementation only take a singleSessionTaskon construction - no additional tasks can be submitted.StringtoString()- 
Methods inherited from class org.apache.tinkerpop.gremlin.server.handler.AbstractSessioncancel, 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
 
- 
 
- 
- 
- 
Field Detail- 
onlySessionTaskprotected final SessionTask onlySessionTask 
 
- 
 - 
Constructor Detail- 
SingleTaskSessionpublic SingleTaskSession(SessionTask onlySessionTask, String sessionId, ConcurrentMap<String,Session> sessions) Constructs aSingleTaskSessionthat has the task to execute supplied on construction.
 
- 
 - 
Method Detail- 
isAcceptingTaskspublic boolean isAcceptingTasks() TheSingleWorkercan 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 returnfalse.
 - 
sendTimeoutResponseForUncommencedTaskpublic void sendTimeoutResponseForUncommencedTask() Description copied from class:AbstractSessionRespond to the client with the specific timeout response for this Session implementation. This is for situations where the Session hasn't started running.- Specified by:
- sendTimeoutResponseForUncommencedTaskin class- AbstractSession
 
 - 
submitTaskpublic boolean submitTask(SessionTask sessionTask) throws RejectedExecutionException This implementation only take a singleSessionTaskon construction - no additional tasks can be submitted.- Throws:
- RejectedExecutionException- if the task cannot be queued
 
 - 
runpublic void run() 
 
- 
 
-