org.mule.umo
Class FutureMessageResult

java.lang.Object
  extended byFutureTask
      extended byorg.mule.umo.FutureMessageResult

public class FutureMessageResult
extends FutureTask

FutureMessageResult is an UMOMessage result of a remote invocation on a Mule Server. This object makes the result available to the client code once the request has been processed. This execution happens asynchronously.

See Also:
Serialized Form

Constructor Summary
FutureMessageResult(Callable callable)
           
FutureMessageResult(Callable callable, UMOTransformer transformer)
          Deprecated. Please use FutureMessageResult(Callable) and configure e.g with setExecutor(Executor) or setTransformer(UMOTransformer)
 
Method Summary
 void execute()
          Start asynchronous execution of this task
 UMOMessage getMessage()
           
 UMOMessage getMessage(long timeout)
           
 void setExecutor(Executor e)
          Set an ExecutorService to run this invocation.
 void setTransformer(UMOTransformer t)
          Set a post-invocation transformer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FutureMessageResult

public FutureMessageResult(Callable callable)

FutureMessageResult

public FutureMessageResult(Callable callable,
                           UMOTransformer transformer)
Deprecated. Please use FutureMessageResult(Callable) and configure e.g with setExecutor(Executor) or setTransformer(UMOTransformer)

Method Detail

setTransformer

public void setTransformer(UMOTransformer t)
Set a post-invocation transformer.

Parameters:
t - UMOTransformer to be applied to the result of this invocation. May be null.

setExecutor

public void setExecutor(Executor e)
Set an ExecutorService to run this invocation.

Parameters:
e - the executor to be used.
Throws:
IllegalArgumentException - when the executor is null or shutdown.

getMessage

public UMOMessage getMessage()
                      throws InterruptedException,
                             ExecutionException,
                             TransformerException
Throws:
InterruptedException
ExecutionException
TransformerException

getMessage

public UMOMessage getMessage(long timeout)
                      throws InterruptedException,
                             ExecutionException,
                             TimeoutException,
                             TransformerException
Throws:
InterruptedException
ExecutionException
TimeoutException
TransformerException

execute

public void execute()
Start asynchronous execution of this task



Copyright © 2003-2006 MuleSource Inc.. All Rights Reserved.