public class DefaultLocalMuleClient extends Object implements LocalMuleClient
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultLocalMuleClient.MuleClientFlowConstruct
Placeholder class which makes the default exception handler available.
|
| Modifier and Type | Field and Description |
|---|---|
protected MuleContext |
muleContext |
| Constructor and Description |
|---|
DefaultLocalMuleClient(MuleContext muleContext) |
| Modifier and Type | Method and Description |
|---|---|
protected MuleEvent |
createMuleEvent(MuleMessage message,
OutboundEndpoint endpoint) |
protected MuleEvent |
createRequestResponseMuleEvent(MuleMessage message) |
void |
dispatch(String url,
MuleMessage message)
Dispatches an event asynchronously to a endpointUri via a Mule server.
|
void |
dispatch(String url,
MuleMessage message,
OperationOptions operationOptions)
Dispatches an event asynchronously to a endpointUri via a Mule server.
|
void |
dispatch(String url,
Object payload,
Map<String,Object> messageProperties) |
MuleMessage |
process(OutboundEndpoint endpoint,
MuleMessage message)
Sends an event synchronously to a endpointUri via a Mule server and a
resulting message is returned.
|
MuleMessage |
process(OutboundEndpoint endpoint,
Object payload,
Map<String,Object> messageProperties)
Sends an event synchronously to a endpointUri via a Mule server and a
resulting message is returned.
|
MuleMessage |
process(String uri,
MessageExchangePattern mep,
MuleMessage message)
Processes a messsage with an outbound endpoint using the specified
MessageExchangePattern |
MuleMessage |
process(String uri,
MessageExchangePattern mep,
Object payload,
Map<String,Object> messageProperties)
Processes a message with an outbound endpoint using the specified
MessageExchangePattern |
MuleMessage |
request(InboundEndpoint endpoint,
long timeout)
Will receive an event from an endpointUri determined by the URL.
|
MuleMessage |
request(String url,
long timeout)
Will receive an event from an endpointUri determined by the URL.
|
protected MuleMessage |
returnMessage(MuleEvent event) |
MuleMessage |
send(String url,
MuleMessage message)
Sends an event synchronously to a endpointUri via a Mule server and a
resulting message is returned.
|
MuleMessage |
send(String url,
MuleMessage message,
long timeout) |
MuleMessage |
send(String url,
MuleMessage message,
OperationOptions operationOptions)
Sends an event synchronously to a endpointUri via a Mule server and a
resulting message is returned.
|
MuleMessage |
send(String url,
Object payload,
Map<String,Object> messageProperties) |
MuleMessage |
send(String url,
Object payload,
Map<String,Object> messageProperties,
long timeout) |
protected final MuleContext muleContext
public DefaultLocalMuleClient(MuleContext muleContext)
public MuleMessage process(OutboundEndpoint endpoint, Object payload, Map<String,Object> messageProperties) throws MuleException
LocalMuleClientprocess in interface LocalMuleClientpayload - the object that is the payload of the eventmessageProperties - any properties to be associated with the payload. In
the case of Jms you could set the JMSReplyTo property in these
properties.null if the the
components invoked explicitly sets a return as null.MuleExceptionpublic MuleMessage process(OutboundEndpoint endpoint, MuleMessage message) throws MuleException
LocalMuleClientprocess in interface LocalMuleClientmessage - the Message for the eventnull if the the
components invoked explicitly sets a return as null.MuleExceptionpublic MuleMessage request(InboundEndpoint endpoint, long timeout) throws MuleException
LocalMuleClientrequest in interface LocalMuleClientendpoint - the Mule URL used to determine the destination and transport
of the messagetimeout - how long to block waiting to receive the event, if set to 0 the
receive will not wait at all and if set to -1 the receive will wait
forevernull if no message was receivedMuleExceptionpublic void dispatch(String url, Object payload, Map<String,Object> messageProperties) throws MuleException
dispatch in interface MuleClienturl - the Mule URL used to determine the destination and transport of the
messagepayload - the object that is the payload of the eventmessageProperties - any properties to be associated with the payload. In
the case of JMS you could set the JMSReplyTo property in these
properties.MuleExceptionpublic MuleMessage send(String url, Object payload, Map<String,Object> messageProperties) throws MuleException
send in interface MuleClienturl - the Mule URL used to determine the destination and transport of the
messagepayload - the object that is the payload of the eventmessageProperties - any properties to be associated with the payload. In
the case of Jms you could set the JMSReplyTo property in these
properties.null if the the
components invoked explicitly sets a return as null.MuleExceptionpublic MuleMessage send(String url, MuleMessage message) throws MuleException
MuleClientsend in interface MuleClienturl - the Mule URL used to determine the destination and transport of the
messagemessage - the Message for the eventnull if the the
components invoked explicitly sets a return as null.MuleExceptionpublic MuleMessage send(String url, MuleMessage message, OperationOptions operationOptions) throws MuleException
MuleClientsend in interface MuleClienturl - the Mule URL used to determine the destination and transport of the
messagemessage - the Message for the eventoperationOptions - the options to configure the operationnull if the the
components invoked explicitly sets a return as null.MuleExceptionpublic MuleMessage send(String url, Object payload, Map<String,Object> messageProperties, long timeout) throws MuleException
send in interface MuleClienturl - the Mule URL used to determine the destination and transport of the
messagepayload - the object that is the payload of the eventmessageProperties - any properties to be associated with the payload. In
the case of Jms you could set the JMSReplyTo property in these
properties.timeout - The time in milliseconds the the call should block waiting for
a responsenull if the the
components invoked explicitly sets a return as null.MuleExceptionpublic MuleMessage send(String url, MuleMessage message, long timeout) throws MuleException
send in interface MuleClienturl - the Mule URL used to determine the destination and transport of the
messagemessage - The message to sendtimeout - The time in milliseconds the the call should block waiting for
a responsenull if the the
components invoked explicitly sets a return as null.MuleExceptionpublic void dispatch(String url, MuleMessage message) throws MuleException
MuleClientdispatch in interface MuleClienturl - the Mule URL used to determine the destination and transport of the
messagemessage - the message to sendMuleExceptionpublic void dispatch(String url, MuleMessage message, OperationOptions operationOptions) throws MuleException
MuleClientdispatch in interface MuleClienturl - the Mule URL used to determine the destination and transport of the
messagemessage - the message to sendoperationOptions - the options to configure the operationMuleExceptionpublic MuleMessage request(String url, long timeout) throws MuleException
MuleClientrequest in interface MuleClienturl - the Mule URL used to determine the destination and transport of the
messagetimeout - how long to block waiting to receive the event, if set to 0 the
receive will not wait at all and if set to -1 the receive will wait
forevernull if no message was receivedMuleExceptionpublic MuleMessage process(String uri, MessageExchangePattern mep, Object payload, Map<String,Object> messageProperties) throws MuleException
MuleClientMessageExchangePatternprocess in interface MuleClientmep - the MessageExchangePattern that should be usedpayload - the message payloadmessageProperties - and message properties that should be used (optional,
use null otherwise)MessageExchangePattern defines a response else null.MuleExceptionpublic MuleMessage process(String uri, MessageExchangePattern mep, MuleMessage message) throws MuleException
MuleClientMessageExchangePatternprocess in interface MuleClientmep - the MessageExchangePattern that should be usedmessage - the message to be processedMessageExchangePattern defines a response else null.MuleExceptionprotected MuleEvent createMuleEvent(MuleMessage message, OutboundEndpoint endpoint) throws EndpointException
EndpointExceptionprotected MuleEvent createRequestResponseMuleEvent(MuleMessage message) throws EndpointException
EndpointExceptionprotected MuleMessage returnMessage(MuleEvent event)
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.