ObjectConsumer consumer = null;
try
{
// get a message from the dispatcher (could block)
final DispatcherMessage message = getMessage();
// process the message from the dispatcher
if (message != null)
{
s_logger.debug("Receiving message");
consumer = (ObjectConsumer)getConsumer();
consumer.start(new DispatcherMessageDelegator()
{
public DispatcherMessage getMessage()
{
return message;
}
public void respond(Object result)
{
if (message.getType() == RECEIVE)
{
m_state.wake(new Long(System.currentTimeMillis()));
}
}