org.mule.api
Class FutureMessageResult
java.lang.Object
java.util.concurrent.FutureTask
org.mule.api.FutureMessageResult
- All Implemented Interfaces:
- Runnable, Future, RunnableFuture
public class FutureMessageResult
- extends FutureTask
FutureMessageResult
is an MuleMessage 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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
muleContext
protected MuleContext muleContext
FutureMessageResult
public FutureMessageResult(Callable callable,
MuleContext muleContext)
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.
setTransformers
public void setTransformers(List t)
- Set a post-invocation transformer.
- Parameters:
t
- Transformers to be applied to the result of this invocation. May be
null.
getMessage
public MuleMessage getMessage()
throws InterruptedException,
ExecutionException,
MuleException
- Throws:
InterruptedException
ExecutionException
MuleException
getMessage
public MuleMessage getMessage(long timeout)
throws InterruptedException,
ExecutionException,
TimeoutException,
MuleException
- Throws:
InterruptedException
ExecutionException
TimeoutException
MuleException
execute
public void execute()
- Start asynchronous execution of this task
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.