org.apache.ode.jbi
Class Receiver

java.lang.Object
  extended by org.apache.ode.jbi.Receiver
All Implemented Interfaces:
java.lang.Runnable

public class Receiver
extends java.lang.Object
implements java.lang.Runnable

Receiver pulls messages from the NMS and submits them to ODE for further processing.


Constructor Summary
Receiver(OdeContext context)
          Constructor for creating instance of this class.
 
Method Summary
 void cease()
          This is called to gracefully stop the Receiver thread.
 void run()
          We periodically poll for input messages, blocking for 1 sec on the accept() call to receive messages.
 void start()
          Start the receiver thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Receiver

public Receiver(OdeContext context)
Constructor for creating instance of this class.

Parameters:
context - for receiving environment parameters.
Method Detail

start

public void start()
Start the receiver thread.


cease

public void cease()
This is called to gracefully stop the Receiver thread. After shutting down the thread pool we wait for a maximum of 10 seconds before forcefully canceling in-flight threads.


run

public void run()
We periodically poll for input messages, blocking for 1 sec on the accept() call to receive messages. Depending on runFlag status we either try to again poll again or exit.

Specified by:
run in interface java.lang.Runnable