public class StandardSocketChannelHandler<E extends Event<SocketChannel>> extends SocketChannelHandler<E>
| Modifier and Type | Field and Description |
|---|---|
private ByteArrayOutputStream |
currBytes |
TCP_DELIMITERcharset, dispatcher, eventFactory, events, key, logger| Constructor and Description |
|---|
StandardSocketChannelHandler(SelectionKey key,
AsyncChannelDispatcher dispatcher,
Charset charset,
EventFactory<E> eventFactory,
BlockingQueue<E> events,
ComponentLog logger) |
| Modifier and Type | Method and Description |
|---|---|
byte |
getDelimiter() |
protected void |
processBuffer(SocketChannel socketChannel,
ByteBuffer socketBuffer)
Process the contents that have been read into the buffer.
|
void |
run() |
private final ByteArrayOutputStream currBytes
public StandardSocketChannelHandler(SelectionKey key, AsyncChannelDispatcher dispatcher, Charset charset, EventFactory<E> eventFactory, BlockingQueue<E> events, ComponentLog logger)
public void run()
protected void processBuffer(SocketChannel socketChannel, ByteBuffer socketBuffer) throws InterruptedException, IOException
socketChannel - the channel the data was read fromsocketBuffer - the buffer the data was read intoInterruptedException - if interrupted when queuing eventsIOExceptionpublic byte getDelimiter()
getDelimiter in class SocketChannelHandler<E extends Event<SocketChannel>>Copyright © 2019 Apache NiFi Project. All rights reserved.