class PumpedTunnelGateway extends TunnelGateway
TunnelGateway.DelayedFlush, TunnelGateway.QueuePreprocessor, TunnelGateway.Receiver, TunnelGateway.Sender| Modifier and Type | Field and Description |
|---|---|
boolean |
_isInbound |
static String |
PROP_INITIAL_OB_QUEUE |
static String |
PROP_MAX_IB_MSGS_PER_PUMP |
static String |
PROP_MAX_IB_QUEUE |
static String |
PROP_MAX_OB_MSGS_PER_PUMP |
_context, _delayedFlush, _lastFlush, _log, _messagesSent, _preprocessor, _queue, _receiver, _sender| Constructor and Description |
|---|
PumpedTunnelGateway(RouterContext context,
TunnelGateway.QueuePreprocessor preprocessor,
TunnelGateway.Sender sender,
TunnelGateway.Receiver receiver,
TunnelGatewayPumper pumper)
Constructs a PumpedTunnelGateway instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(I2NPMessage msg,
Hash toRouter,
TunnelId toTunnel)
Adds a message to be sent down the tunnel.
|
protected void |
add(PendingGatewayMessage cur)
Adds a PendingGatewayMessage to the prequeue and notifies the pumper to process it.
|
boolean |
pump(List<PendingGatewayMessage> queueBuf)
Pumps messages from the internal prequeue into the processing queue.
|
add, getMessagesSentpublic final boolean _isInbound
public static final String PROP_INITIAL_OB_QUEUE
public static final String PROP_MAX_IB_MSGS_PER_PUMP
public static final String PROP_MAX_IB_QUEUE
public static final String PROP_MAX_OB_MSGS_PER_PUMP
public PumpedTunnelGateway(RouterContext context, TunnelGateway.QueuePreprocessor preprocessor, TunnelGateway.Sender sender, TunnelGateway.Receiver receiver, TunnelGatewayPumper pumper)
context - RouterContextpreprocessor - QueuePreprocessor responsible for preprocessing messagessender - Sender responsible for encrypting and delivering messagesreceiver - Receiver that consumes encrypted messages for forwardingpumper - TunnelGatewayPumper managing pumping threadspublic void add(I2NPMessage msg, Hash toRouter, TunnelId toTunnel)
add in class TunnelGatewaymsg - the message to sendtoRouter - optional target routertoTunnel - optional target tunnelprotected void add(PendingGatewayMessage cur)
cur - the PendingGatewayMessage to addpublic boolean pump(List<PendingGatewayMessage> queueBuf)
queueBuf - an empty list used as a temporary buffer for messages (will be cleared before return)