java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.client.MessageReceivedJob
All Implemented Interfaces:
Job

class MessageReceivedJobextends JobImpl
Async job to notify the client that a new message is available for them, or just send it directly if specified.
  • Constructor Details

    • MessageReceivedJob

      public MessageReceivedJob(RouterContext ctx, ClientConnectionRunner runner, Destination toDest, Destination fromDest, Payload payload, boolean sendDirect)
      Create a job that delivers one received message to a client.
      Parameters:
      ctx - the router context
      runner - the client connection runner
      toDest - non-null, required to pick session
      fromDest - sending destination, generally null
      payload - the message payload
      sendDirect - if true send directly
  • Method Details

    • 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.
    • receiveMessage

      public boolean receiveMessage()
      Same as runJob() but with a return value.
      Returns:
      true if the payload was handed over, false if the runner is dead or the send threw