PumpedTunnelGateway
, TunnelGatewayZeroHop
abstract class TunnelGateway
extends java.lang.Object
修飾子とタイプ | クラス | 説明 |
---|---|---|
protected class |
TunnelGateway.DelayedFlush |
|
static interface |
TunnelGateway.QueuePreprocessor |
|
static interface |
TunnelGateway.Receiver |
|
static interface |
TunnelGateway.Sender |
修飾子とタイプ | フィールド | 説明 |
---|---|---|
protected RouterContext |
_context |
|
protected TunnelGateway.DelayedFlush |
_delayedFlush |
|
protected long |
_lastFlush |
|
protected Log |
_log |
|
protected int |
_messagesSent |
|
protected TunnelGateway.QueuePreprocessor |
_preprocessor |
|
protected java.util.List<PendingGatewayMessage> |
_queue |
|
protected TunnelGateway.Receiver |
_receiver |
|
protected TunnelGateway.Sender |
_sender |
修飾子 | コンストラクタ | 説明 |
---|---|---|
protected |
TunnelGateway(RouterContext context,
TunnelGateway.QueuePreprocessor preprocessor,
TunnelGateway.Sender sender,
TunnelGateway.Receiver receiver) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
void |
add(I2NPMessage msg,
Hash toRouter,
TunnelId toTunnel) |
Add a message to be sent down the tunnel, either sending it now (perhaps
coallesced with other pending messages) or after a brief pause (_flushFrequency).
|
void |
add(TunnelGatewayMessage msg) |
Add a message to be sent down the tunnel, where we are the inbound gateway.
|
int |
getMessagesSent() |
protected final RouterContext _context
protected final Log _log
protected final java.util.List<PendingGatewayMessage> _queue
protected final TunnelGateway.QueuePreprocessor _preprocessor
protected final TunnelGateway.Sender _sender
protected final TunnelGateway.Receiver _receiver
protected long _lastFlush
protected final TunnelGateway.DelayedFlush _delayedFlush
protected int _messagesSent
protected TunnelGateway(RouterContext context, TunnelGateway.QueuePreprocessor preprocessor, TunnelGateway.Sender sender, TunnelGateway.Receiver receiver)
preprocessor
- this pulls Pending messages off a list, builds some
full preprocessed messages, and pumps those into the sendersender
- this takes a preprocessed message, encrypts it, and sends it to
the receiverreceiver
- this receives the encrypted message and forwards it off
to the first hoppublic void add(TunnelGatewayMessage msg)
msg
- message received to be sent through the tunnelpublic void add(I2NPMessage msg, Hash toRouter, TunnelId toTunnel)
msg
- message to be sent through the tunneltoRouter
- router to send to after the endpoint (or null for endpoint processing)toTunnel
- tunnel to send to after the endpoint (or null for endpoint or router processing)public int getMessagesSent()