public abstract class AbstractTcpReaderStage<T> extends AbstractProducerStage<T>
outputPort
logger
Constructor and Description |
---|
AbstractTcpReaderStage(int port,
int bufferCapacity) |
Modifier and Type | Method and Description |
---|---|
protected void |
execute()
Contains the logic of this stage and is invoked (possibly multiple times) by the framework.
|
protected abstract boolean |
read(ByteBuffer buffer) |
getOutputPort, getTerminationStrategy
abort, addInputPortRemovedListener, addOutputPortRemovedListener, compareAndSetBeingExecuted, createInputPort, createInputPort, createInputPort, createInputPort, createOutputPort, createOutputPort, createOutputPort, createOutputPort, declareActive, declarePassive, executeByFramework, getCurrentState, getId, getInputPorts, getOutputPorts, getOwningThread, isActive, isBeingExecuted, isPaused, isProducer, isStateless, onSignal, onStarting, onTerminating, onValidating, removeDynamicPort, removeDynamicPort, setPaused, setStateless, shouldBeTerminated, signalAlreadyReceived, terminateStage, toString, workCompleted
public AbstractTcpReaderStage(int port, int bufferCapacity)
protected void execute()
AbstractStage
execute
in class AbstractStage
protected abstract boolean read(ByteBuffer buffer)
buffer
- to be read fromtrue
when there were enough bytes to perform the read operation
false
otherwise. In this case, the buffer is reset, compacted, and filled with new content.
Copyright © 2015–2020. All rights reserved.