org.mule.module.client
Class RemoteDispatcher
java.lang.Object
org.mule.module.client.RemoteDispatcher
- All Implemented Interfaces:
- Disposable
public class RemoteDispatcher
- extends Object
- implements Disposable
RemoteDispatcher is used to make and receive requests to a remote
Mule instance. It is used to proxy requests to Mule using the Server URL as the
transport channel.
|
Field Summary |
protected static org.apache.commons.logging.Log |
logger
logger used by this class |
|
Method Summary |
FutureMessageResult |
asyncReceiveRemote(String endpoint,
int timeout)
|
protected MuleMessage |
dispatchAction(RemoteDispatcherNotification action,
boolean synchronous,
int timeout)
|
void |
dispatchRemote(String endpoint,
Object payload,
Map messageProperties)
|
void |
dispatchToRemoteComponent(String component,
Object payload,
Map messageProperties)
Dispatcher an event asynchronously to a components on a remote Mule instance. |
void |
dispose()
|
protected MuleMessage |
doToRemote(String endpoint,
Object payload,
Map messageProperties,
boolean synchronous,
int timeout)
|
protected MuleMessage |
doToRemoteComponent(String component,
Object payload,
Map messageProperties,
boolean synchronous)
|
WireFormat |
getWireFormat()
|
MuleMessage |
receiveRemote(String endpoint,
int timeout)
|
protected WireFormat |
requestWireFormat()
|
FutureMessageResult |
sendAsyncRemote(String endpoint,
Object payload,
Map messageProperties)
|
FutureMessageResult |
sendAsyncToRemoteComponent(String component,
String transformers,
Object payload,
Map messageProperties)
sends an event to a components on a remote Mule instance, while making the
result of the event trigger available as a Future result that can be accessed
later by client code. |
MuleMessage |
sendRemote(String endpoint,
Object payload,
Map messageProperties)
|
MuleMessage |
sendRemote(String endpoint,
Object payload,
Map messageProperties,
int timeout)
|
MuleMessage |
sendToRemoteComponent(String component,
Object payload,
Map messageProperties)
sends an event synchronously to a components on a remote Mule instance. |
protected void |
setCredentials(MuleMessage message)
|
protected void |
setExecutor(Executor e)
|
void |
setWireFormat(WireFormat wireFormat)
|
protected void |
updateContext(MuleMessage message,
ImmutableEndpoint endpoint,
boolean synchronous)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final org.apache.commons.logging.Log logger
- logger used by this class
RemoteDispatcher
protected RemoteDispatcher(String endpoint,
Credentials credentials,
MuleContext muleContext)
throws MuleException
- Throws:
MuleException
RemoteDispatcher
protected RemoteDispatcher(String endpoint,
MuleContext muleContext)
throws MuleException
- Throws:
MuleException
requestWireFormat
protected WireFormat requestWireFormat()
throws MuleException
- Throws:
MuleException
setExecutor
protected void setExecutor(Executor e)
dispatchToRemoteComponent
public void dispatchToRemoteComponent(String component,
Object payload,
Map messageProperties)
throws MuleException
- Dispatcher an event asynchronously to a components on a remote Mule instance.
Users can endpoint a url to a remote Mule server in the constructor of a Mule
client, by default the default Mule server url tcp://localhost:60504 is used.
- Parameters:
component - the name of the Mule components to dispatch topayload - the object that is the payload of the eventmessageProperties - any properties to be associated with the payload. as
null
- Throws:
MuleException - if the dispatch fails or the components or
transfromers cannot be found
sendToRemoteComponent
public MuleMessage sendToRemoteComponent(String component,
Object payload,
Map messageProperties)
throws MuleException
- sends an event synchronously to a components on a remote Mule instance. Users
can endpoint a url to a remote Mule server in the constructor of a Mule
client, by default the default Mule server url tcp://localhost:60504 is used.
- Parameters:
component - the name of the Mule components to send topayload - the object that is the payload of the eventmessageProperties - any properties to be associated with the payload. as
null
- Returns:
- the result message if any of the invocation
- Throws:
MuleException - if the dispatch fails or the components or
transfromers cannot be found
sendAsyncToRemoteComponent
public FutureMessageResult sendAsyncToRemoteComponent(String component,
String transformers,
Object payload,
Map messageProperties)
throws MuleException
- sends an event to a components on a remote Mule instance, while making the
result of the event trigger available as a Future result that can be accessed
later by client code. Users can endpoint a url to a remote Mule server in the
constructor of a Mule client, by default the default Mule server url
tcp://localhost:60504 is used.
- Parameters:
component - the name of the Mule components to send totransformers - a comma separated list of transformers to apply to the
result messagepayload - the object that is the payload of the eventmessageProperties - any properties to be associated with the payload. as
null
- Returns:
- the result message if any of the invocation
- Throws:
MuleException - if the dispatch fails or the components or
transfromers cannot be found
sendRemote
public MuleMessage sendRemote(String endpoint,
Object payload,
Map messageProperties,
int timeout)
throws MuleException
- Throws:
MuleException
sendRemote
public MuleMessage sendRemote(String endpoint,
Object payload,
Map messageProperties)
throws MuleException
- Throws:
MuleException
dispatchRemote
public void dispatchRemote(String endpoint,
Object payload,
Map messageProperties)
throws MuleException
- Throws:
MuleException
sendAsyncRemote
public FutureMessageResult sendAsyncRemote(String endpoint,
Object payload,
Map messageProperties)
throws MuleException
- Throws:
MuleException
receiveRemote
public MuleMessage receiveRemote(String endpoint,
int timeout)
throws MuleException
- Throws:
MuleException
asyncReceiveRemote
public FutureMessageResult asyncReceiveRemote(String endpoint,
int timeout)
throws MuleException
- Throws:
MuleException
doToRemoteComponent
protected MuleMessage doToRemoteComponent(String component,
Object payload,
Map messageProperties,
boolean synchronous)
throws MuleException
- Throws:
MuleException
doToRemote
protected MuleMessage doToRemote(String endpoint,
Object payload,
Map messageProperties,
boolean synchronous,
int timeout)
throws MuleException
- Throws:
MuleException
dispatchAction
protected MuleMessage dispatchAction(RemoteDispatcherNotification action,
boolean synchronous,
int timeout)
throws MuleException
- Throws:
MuleException
dispose
public void dispose()
- Specified by:
dispose in interface Disposable
setCredentials
protected void setCredentials(MuleMessage message)
getWireFormat
public WireFormat getWireFormat()
setWireFormat
public void setWireFormat(WireFormat wireFormat)
updateContext
protected void updateContext(MuleMessage message,
ImmutableEndpoint endpoint,
boolean synchronous)
throws MuleException
- Throws:
MuleException
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.