public class StreamMonitorPlugin<T> extends AbstractPlugin<T>
| Modifier and Type | Field and Description |
|---|---|
static BiConsumer<AsynchronousSocketChannel,byte[]> |
BLUE_HEX_INPUT_STREAM |
static BiConsumer<AsynchronousSocketChannel,byte[]> |
BLUE_TEXT_INPUT_STREAM |
static BiConsumer<AsynchronousSocketChannel,byte[]> |
RED_HEX_OUTPUT_STREAM |
static BiConsumer<AsynchronousSocketChannel,byte[]> |
RED_TEXT_OUTPUT_STREAM |
| Constructor and Description |
|---|
StreamMonitorPlugin() |
StreamMonitorPlugin(BiConsumer<AsynchronousSocketChannel,byte[]> inputStreamConsumer,
BiConsumer<AsynchronousSocketChannel,byte[]> outputStreamConsumer) |
| Modifier and Type | Method and Description |
|---|---|
AsynchronousSocketChannel |
shouldAccept(AsynchronousSocketChannel channel)
监控已接收到的连接
|
afterRead, afterWrite, beforeRead, beforeWrite, preProcess, stateEventpublic static final BiConsumer<AsynchronousSocketChannel,byte[]> BLUE_HEX_INPUT_STREAM
public static final BiConsumer<AsynchronousSocketChannel,byte[]> RED_HEX_OUTPUT_STREAM
public static final BiConsumer<AsynchronousSocketChannel,byte[]> BLUE_TEXT_INPUT_STREAM
public static final BiConsumer<AsynchronousSocketChannel,byte[]> RED_TEXT_OUTPUT_STREAM
public StreamMonitorPlugin()
public StreamMonitorPlugin(BiConsumer<AsynchronousSocketChannel,byte[]> inputStreamConsumer, BiConsumer<AsynchronousSocketChannel,byte[]> outputStreamConsumer)
public AsynchronousSocketChannel shouldAccept(AsynchronousSocketChannel channel)
NetMonitorshouldAccept in interface NetMonitorshouldAccept in class AbstractPlugin<T>channel - 当前已经建立连接的通道对象Copyright © 2021. All rights reserved.