class MessageReceiver extends Object
InboundMessageFragments queue,
parse 'em into I2NPMessages, and stick them on the
InNetMessagePool by way of the UDPTransport.
Supports dynamic thread count adjustment via setThreadCount(int).| Constructor and Description |
|---|
MessageReceiver(RouterContext ctx,
UDPTransport transport)MessageReceiver. |
| Modifier and Type | Method and Description |
|---|---|
(package private) void | adjustThreads()Dynamically adjust thread count. |
int | getProcessingCount()Returns the number of runners actively processing messages (not parked on take()). |
int | getQueueCapacity()Returns the maximum capacity of the message receiver queue. |
int | getQueueSize()Returns the current queue depth of the message receiver. |
static int | getThreadCount()Returns the current target thread count. |
double | getUtilization()Get message receiver pool utilization as a ratio (0.0-1.0). |
(package private) void | loop(I2NPMessageHandler handler)Main processing loop. |
void | receiveMessage(InboundMessageState state)This queues the message for processing. |
static void | setThreadCount(int count)Sets the target thread count. |
void | shutdown()shutdown. |
void | startup()startup. |
public MessageReceiver(RouterContext ctx, UDPTransport transport)
void adjustThreads()
public int getProcessingCount()
public int getQueueCapacity()
public int getQueueSize()
public static int getThreadCount()
public double getUtilization()
void loop(I2NPMessageHandler handler)
public void receiveMessage(InboundMessageState state)
public static void setThreadCount(int count)
public void shutdown()
public void startup()