net.i2p.router.message

## Class SendMessageDirectJob

- java.lang.Object
- - net.i2p.router.JobImpl
  - - net.i2p.router.message.SendMessageDirectJob

- All Implemented Interfaces:
    Job

      public class SendMessageDirectJob
      extends JobImpl

  Send a message directly to another router, i.e. not through a tunnel. This is safe to run inline via runJob(). If the RouterInfo for the Hash is not found locally, it will queue a lookup and register itself to be run again when the lookup succeeds or times out.

- - ### Field Summary

    - ### Fields inherited from class net.i2p.router.JobImpl

      `_id`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SendMessageDirectJob(RouterContext ctx, I2NPMessage message, Hash toPeer, int timeoutMs, int priority)`
    `SendMessageDirectJob(RouterContext ctx, I2NPMessage message, Hash toPeer, int timeoutMs, int priority, long msgIDBloomXor)`
    `SendMessageDirectJob(RouterContext ctx, I2NPMessage message, Hash toPeer, Job onSend, ReplyJob onSuccess, Job onFail, MessageSelector selector, int timeoutMs, int priority, long msgIDBloomXor)`
    `SendMessageDirectJob(RouterContext ctx, I2NPMessage message, Hash toPeer, ReplyJob onSuccess, Job onFail, MessageSelector selector, int timeoutMs, int priority)`
    `SendMessageDirectJob(RouterContext ctx, I2NPMessage message, Hash toPeer, ReplyJob onSuccess, Job onFail, MessageSelector selector, int timeoutMs, int priority, long msgIDBloomXor)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getName()` Descriptive name of the task
    `void` | `runJob()` Actually perform the task.

    - ### Methods inherited from class net.i2p.router.JobImpl

      `dropped, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toString`

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

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

- - ### Constructor Detail

    - #### SendMessageDirectJob

          public SendMessageDirectJob(RouterContext ctx,
                                      I2NPMessage message,
                                      Hash toPeer,
                                      int timeoutMs,
                                      int priority)

      Parameters:
        `toPeer` - may be ourselves

    - #### SendMessageDirectJob

          public SendMessageDirectJob(RouterContext ctx,
                                      I2NPMessage message,
                                      Hash toPeer,
                                      int timeoutMs,
                                      int priority,
                                      long msgIDBloomXor)

      Parameters:
        `toPeer` - may be ourselves
        `msgIDBloomXor` - value to xor the messageID with before passing to the InNetMessagePool, may be 0

    - #### SendMessageDirectJob

          public SendMessageDirectJob(RouterContext ctx,
                                      I2NPMessage message,
                                      Hash toPeer,
                                      Job onSend,
                                      ReplyJob onSuccess,
                                      Job onFail,
                                      MessageSelector selector,
                                      int timeoutMs,
                                      int priority,
                                      long msgIDBloomXor)

      Parameters:
        `toPeer` - may be ourselves
        `onSend` - may be null
        `onSuccess` - may be null
        `onFail` - may be null
        `selector` - be null
        `msgIDBloomXor` - value to xor the messageID with before passing to the InNetMessagePool, may be 0

    - #### SendMessageDirectJob

          public SendMessageDirectJob(RouterContext ctx,
                                      I2NPMessage message,
                                      Hash toPeer,
                                      ReplyJob onSuccess,
                                      Job onFail,
                                      MessageSelector selector,
                                      int timeoutMs,
                                      int priority)

      Parameters:
        `toPeer` - may be ourselves
        `onSuccess` - may be null
        `onFail` - may be null
        `selector` - be null

    - #### SendMessageDirectJob

          public SendMessageDirectJob(RouterContext ctx,
                                      I2NPMessage message,
                                      Hash toPeer,
                                      ReplyJob onSuccess,
                                      Job onFail,
                                      MessageSelector selector,
                                      int timeoutMs,
                                      int priority,
                                      long msgIDBloomXor)

      Parameters:
        `toPeer` - may be ourselves
        `onSuccess` - may be null
        `onFail` - may be null
        `selector` - be null
        `msgIDBloomXor` - value to xor the messageID with before passing to the InNetMessagePool, may be 0

  - ### Method Detail

    - #### getName

          public String getName()

      Description copied from interface: `Job`
      Descriptive name of the task
      Returns:
        the descriptive name of the task

    - #### runJob

          public void runJob()

      Description copied from interface: `Job`
      Actually perform the task. This call blocks until the Job is complete.