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
- SocketException
IOException
public static DatagramChannel openChannel(SyslogdConfig config) throws SocketException, IOException
SocketException
IOException
public String getName()
getName
in interface SyslogReceiver
public void stop() throws InterruptedException
stop
in interface SyslogReceiver
InterruptedException
public SyslogConnectionHandler getSyslogConnectionHandlers()
public void setSyslogConnectionHandlers(SyslogConnectionHandler handler)
public void run()
run
in interface Runnable
run
in interface SyslogReceiver
Copyright © 2017. All rights reserved.