Interface OpProcessor
- 
- All Superinterfaces:
- AutoCloseable
 - All Known Implementing Classes:
- AbstractEvalOpProcessor,- AbstractOpProcessor,- SessionOpProcessor,- StandardOpProcessor,- TraversalOpProcessor
 
 public interface OpProcessor extends AutoCloseable Interface for providing commands that websocket requests will respond to.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description StringgetName()The name of the processor which requests must refer to "processor" field on a request.default voidinit(Settings settings)Initialize theOpProcessorwith settings from the server.ThrowingConsumer<Context>select(Context ctx)Given the context (which contains the RequestMessage), return back a Consumer function that will be executed with the context.- 
Methods inherited from interface java.lang.AutoCloseableclose
 
- 
 
- 
- 
- 
Method Detail- 
getNameString getName() The name of the processor which requests must refer to "processor" field on a request.
 - 
initdefault void init(Settings settings) Initialize theOpProcessorwith settings from the server. This method should only be called once at server startup by a single thread.
 - 
selectThrowingConsumer<Context> select(Context ctx) throws OpProcessorException Given the context (which contains the RequestMessage), return back a Consumer function that will be executed with the context. A typical implementation will simply check the "op" field on the RequestMessage and return the Consumer function for that particular operation.- Parameters:
- ctx-
- Returns:
- Throws:
- OpProcessorException
 
 
- 
 
-