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.Modifier and Type | Field and Description |
---|---|
protected MuleContext |
muleContext |
Constructor and Description |
---|
FutureMessageResult(Callable callable,
MuleContext muleContext) |
Modifier and Type | Method and Description |
---|---|
void |
execute()
Start asynchronous execution of this task
|
MuleMessage |
getMessage() |
MuleMessage |
getMessage(long timeout) |
void |
setExecutor(Executor e)
Set an ExecutorService to run this invocation.
|
void |
setTransformers(List t)
Set a post-invocation transformer.
|
cancel, done, get, get, isCancelled, isDone, run, runAndReset, set, setException
protected MuleContext muleContext
public FutureMessageResult(Callable callable, MuleContext muleContext)
public void setExecutor(Executor e)
e
- the executor to be used.IllegalArgumentException
- when the executor is null or shutdown.public void setTransformers(List t)
t
- Transformers to be applied to the result of this invocation. May be
null.public MuleMessage getMessage() throws InterruptedException, ExecutionException, MuleException
public MuleMessage getMessage(long timeout) throws InterruptedException, ExecutionException, TimeoutException, MuleException
public void execute()
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.