public class OutboundClientMessageOneShotJob extends JobImpl
This class is where we make several important decisions about what to send and what path to send it over. These decisions will dramatically affect:
For the outbound message, we build and encrypt a garlic message, after making the following decisions:
Also, we make the following path selection decisions:
Note that the 4th tunnel in the DeliveryStatusMessage's round trip (his outbound tunnel) is not selected by us, it is chosen by the recipient.
If a DeliveryStatusMessage is sent, a listener is registered to wait for its reply. When a reply is received, or the timeout is reached, this is noted and will influence subsequent bundling and path selection decisions.
Path selection decisions are cached and reused if still valid and if previous deliveries were apparently successful. This significantly reduces out-of-order delivery and network connection congestion. Caching is based on the local/remote destination pair.
Bundling decisions, and both messaging and reply expiration times, are generally set here but may be overridden by the client on a per-message basis. Within clients, there may be overall settings or per-message settings. The streaming lib also overrides defaults for some messages. A datagram-based DHT application may need significantly different settings than a streaming application. For an application such as a bittorrent client that sends both types of traffic on the same tunnels, it is important to tune the settings for efficiency and performance. The per-session and per-message overrides are set via I2CP.
Modifier and Type | Field and Description |
---|---|
static String |
BUNDLE_REPLY_LEASESET
NOTE: Changed as of 0.9.2.
|
static String |
OVERALL_TIMEOUT_MS_PARAM
final timeout (in milliseconds) that the outbound message will fail in.
|
Constructor and Description |
---|
OutboundClientMessageOneShotJob(RouterContext ctx,
OutboundCache cache,
ClientMessage msg)
Send the sucker
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Descriptive name of the task
|
static void |
init(RouterContext ctx)
call once only
|
void |
runJob()
Actually perform the task.
|
dropped, getAddedBy, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toString
public static final String OVERALL_TIMEOUT_MS_PARAM
public static final String BUNDLE_REPLY_LEASESET
public OutboundClientMessageOneShotJob(RouterContext ctx, OutboundCache cache, ClientMessage msg)
public static void init(RouterContext ctx)
public void runJob()
Job