org.apache.camel.component.jms.requestor
Class FutureHandler

java.lang.Object
  extended by java.util.concurrent.FutureTask<Message>
      extended by org.apache.camel.component.jms.requestor.FutureHandler
All Implemented Interfaces:
Runnable, Future<Message>, ReplyHandler
Direct Known Subclasses:
PersistentReplyToFutureHandler

public class FutureHandler
extends FutureTask<Message>
implements ReplyHandler

A FutureTask which implements ReplyHandler so that it can be used as a handler for a correlation ID

Version:
$Revision: 473 $

Constructor Summary
FutureHandler()
           
 
Method Summary
 boolean handle(Message message)
          Processes the message, returning true if this is the last method of a lifecycle so that the handler can be discarded
 void set(Message result)
           
 
Methods inherited from class java.util.concurrent.FutureTask
cancel, done, get, get, isCancelled, isDone, run, runAndReset, setException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FutureHandler

public FutureHandler()
Method Detail

set

public void set(Message result)
Overrides:
set in class FutureTask<Message>

handle

public boolean handle(Message message)
               throws JMSException
Description copied from interface: ReplyHandler
Processes the message, returning true if this is the last method of a lifecycle so that the handler can be discarded

Specified by:
handle in interface ReplyHandler
Throws:
JMSException


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.