public class SyslogReceiverNioThreadPoolImpl extends Object implements SyslogReceiver
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_PACKET_SIZE
This size is used as the size of each
ByteBuffer used to capture syslog
messages. |
static int |
SOCKET_RECEIVER_COUNT
This is the number of NIO listener threads that will process
DatagramChannel.receive(ByteBuffer)
calls on the syslog port. |
| Constructor and Description |
|---|
SyslogReceiverNioThreadPoolImpl(SyslogdConfig config)
Construct a new receiver
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName() |
SyslogConnectionHandler |
getSyslogConnectionHandlers() |
static DatagramChannel |
openChannel(SyslogdConfig config) |
void |
run()
The execution context.
|
void |
setSyslogConnectionHandlers(SyslogConnectionHandler handler) |
void |
stop()
stop the current receiver
|
public static final int MAX_PACKET_SIZE
ByteBuffer used to capture syslog
messages.public static final int SOCKET_RECEIVER_COUNT
DatagramChannel.receive(ByteBuffer)
calls on the syslog port.public SyslogReceiverNioThreadPoolImpl(SyslogdConfig config) throws SocketException, IOException
sock - matchPattern - hostGroup - messageGroup - SocketExceptionIOExceptionpublic static DatagramChannel openChannel(SyslogdConfig config) throws SocketException, IOException
SocketExceptionIOExceptionpublic String getName()
getName in interface SyslogReceiverpublic void stop()
throws InterruptedException
stop in interface SyslogReceiverInterruptedExceptionpublic SyslogConnectionHandler getSyslogConnectionHandlers()
public void setSyslogConnectionHandlers(SyslogConnectionHandler handler)
public void run()
run in interface Runnablerun in interface SyslogReceiverCopyright © 2017. All rights reserved.