net.i2p.router.message

## Class OutboundClientMessageJobHelper

- java.lang.Object
- - net.i2p.router.message.OutboundClientMessageJobHelper

-     class OutboundClientMessageJobHelper
      extends Object

  Static methods to create a Garlic Message with one or more cloves, as follows:

       GarlicMessage
           Ack Clove (optional)
               Tunnel delivery instructions
               Garlic Message
                   Delivery Status Clove
                       Local delivery instructions
                       Delivery Status Message
           LeaseSet Clove (optional)
               Local delivery instructions
               Database Store Message
           Data Clove (required)
               Destination delivery instructions
               Data Message

  The low-level construction is in GarlicMessageBuilder.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OutboundClientMessageJobHelper()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) static GarlicMessage` | `createGarlicMessage(RouterContext ctx, long replyToken, long expiration, PublicKey recipientPK, PayloadGarlicConfig dataClove, Hash from, Destination dest, TunnelInfo replyTunnel, int tagsToSendOverride, int lowTagsOverride, SessionKey wrappedKey, Set<SessionTag> wrappedTags, boolean requireAck, LeaseSet bundledReplyLeaseSet, ReplyCallback callback)` Allow the app to specify the data clove directly, which enables OutboundClientMessage to resend the same payload (including expiration and unique id) in different garlics (down different tunnels) This is called from OCMOSJ

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### OutboundClientMessageJobHelper

          OutboundClientMessageJobHelper()

  - ### Method Detail

    - #### createGarlicMessage

          static GarlicMessage createGarlicMessage(RouterContext ctx,
                                                   long replyToken,
                                                   long expiration,
                                                   PublicKey recipientPK,
                                                   PayloadGarlicConfig dataClove,
                                                   Hash from,
                                                   Destination dest,
                                                   TunnelInfo replyTunnel,
                                                   int tagsToSendOverride,
                                                   int lowTagsOverride,
                                                   SessionKey wrappedKey,
                                                   Set<SessionTag> wrappedTags,
                                                   boolean requireAck,
                                                   LeaseSet bundledReplyLeaseSet,
                                                   ReplyCallback callback)

      Allow the app to specify the data clove directly, which enables OutboundClientMessage to resend the same payload (including expiration and unique id) in different garlics (down different tunnels) This is called from OCMOSJ
      Parameters:
        `dataClove` - may be null for ECIES-layer ack
        `tagsToSendOverride` - if > 0, use this instead of skm's default
        `lowTagsOverride` - if > 0, use this instead of skm's default
        `wrappedKey` - for ElGamal, non-null with null data, output parameter that will be filled with the SessionKey used, may be null for ECIES
        `wrappedTags` - for ElGamal, output parameter that will be filled with the sessionTags used, may be null for ECIES
        `replyTunnel` - non-null if requireAck is true or bundledReplyLeaseSet is non-null
        `requireAck` - if true, bundle replyToken in an ack clove
        `bundledReplyLeaseSet` - may be null; if non-null, put it in a clove
        `callback` - only for ECIES, may be null
      Returns:
        garlic, or null if no tunnels were found (or other errors)