net.i2p.router.message
Class HandleGarlicMessageJob

java.lang.Object
  extended by net.i2p.router.JobImpl
      extended by net.i2p.router.message.HandleGarlicMessageJob
All Implemented Interfaces:
Job, GarlicMessageReceiver.CloveReceiver

public class HandleGarlicMessageJob
extends JobImpl
implements GarlicMessageReceiver.CloveReceiver

Unencrypt a garlic message and handle each of the cloves - locally destined messages are tossed into the inbound network message pool so they're handled as if they arrived locally. Other instructions are not yet implemented (but need to be. soon)


Constructor Summary
HandleGarlicMessageJob(RouterContext context, GarlicMessage msg, RouterIdentity from, Hash fromHash)
           
 
Method Summary
 void dropped()
          the router is extremely overloaded, so this job has been dropped.
 java.lang.String getName()
          Descriptive name of the task
 void handleClove(DeliveryInstructions instructions, I2NPMessage data)
           
 void runJob()
          Actually perform the task.
 
Methods inherited from class net.i2p.router.JobImpl
getAddedBy, 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

HandleGarlicMessageJob

public HandleGarlicMessageJob(RouterContext context,
                              GarlicMessage msg,
                              RouterIdentity from,
                              Hash fromHash)
Parameters:
from - ignored
fromHash - ignored
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Job
Descriptive name of the task

Specified by:
getName in interface Job

runJob

public void runJob()
Description copied from interface: Job
Actually perform the task. This call blocks until the Job is complete.

Specified by:
runJob in interface Job

handleClove

public void handleClove(DeliveryInstructions instructions,
                        I2NPMessage data)
Specified by:
handleClove in interface GarlicMessageReceiver.CloveReceiver

dropped

public void dropped()
Description copied from interface: Job
the router is extremely overloaded, so this job has been dropped. if for some reason the job *must* do some cleanup / requeueing of other tasks, it should do so here.

Specified by:
dropped in interface Job
Overrides:
dropped in class JobImpl