public class DefaultLocalMuleClient extends Object implements MuleClient
| Modifier and Type | Field and Description |
|---|---|
static String |
MESSAGE_FILTERED_ERROR_MESSAGE |
protected MuleContext |
muleContext |
| Constructor and Description |
|---|
DefaultLocalMuleClient(MuleContext muleContext) |
| Modifier and Type | Method and Description |
|---|---|
protected org.mule.runtime.api.message.Message |
createMessage(Object payload,
Map<String,Serializable> messageProperties) |
protected Event |
createMuleEvent(org.mule.runtime.api.message.Message message) |
void |
dispatch(String url,
org.mule.runtime.api.message.Message message)
Dispatches an event asynchronously to a endpointUri via a Mule server.
|
void |
dispatch(String url,
org.mule.runtime.api.message.Message message,
OperationOptions operationOptions)
Dispatches an event asynchronously to a endpointUri via a Mule server.
|
void |
dispatch(String url,
Object payload,
Map<String,Serializable> messageProperties) |
protected ConnectorOperationLocator |
getConnectorMessageProcessLocator() |
Either<org.mule.runtime.api.message.Error,Optional<org.mule.runtime.api.message.Message>> |
request(String url,
long timeout)
Will receive an event from an endpointUri determined by the URL.
|
protected Event |
returnEvent(Event event) |
Either<org.mule.runtime.api.message.Error,org.mule.runtime.api.message.Message> |
send(String url,
org.mule.runtime.api.message.Message message)
Sends an event synchronously to a endpointUri via a Mule server and a resulting message is returned.
|
Either<org.mule.runtime.api.message.Error,org.mule.runtime.api.message.Message> |
send(String url,
org.mule.runtime.api.message.Message message,
long timeout) |
Either<org.mule.runtime.api.message.Error,org.mule.runtime.api.message.Message> |
send(String url,
org.mule.runtime.api.message.Message message,
OperationOptions operationOptions)
Sends an event synchronously to a endpointUri via a Mule server and a resulting message is returned.
|
Either<org.mule.runtime.api.message.Error,org.mule.runtime.api.message.Message> |
send(String url,
Object payload,
Map<String,Serializable> messageProperties) |
Either<org.mule.runtime.api.message.Error,org.mule.runtime.api.message.Message> |
send(String url,
Object payload,
Map<String,Serializable> messageProperties,
long timeout) |
public static final String MESSAGE_FILTERED_ERROR_MESSAGE
protected final MuleContext muleContext
public DefaultLocalMuleClient(MuleContext muleContext)
protected ConnectorOperationLocator getConnectorMessageProcessLocator()
public void dispatch(String url, Object payload, Map<String,Serializable> messageProperties) throws org.mule.runtime.api.exception.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.org.mule.runtime.api.exception.MuleExceptionpublic Either<org.mule.runtime.api.message.Error,org.mule.runtime.api.message.Message> send(String url, Object payload, Map<String,Serializable> messageProperties) throws org.mule.runtime.api.exception.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.org.mule.runtime.api.exception.MuleExceptionpublic Either<org.mule.runtime.api.message.Error,org.mule.runtime.api.message.Message> send(String url, org.mule.runtime.api.message.Message message) throws org.mule.runtime.api.exception.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.org.mule.runtime.api.exception.MuleExceptionpublic Either<org.mule.runtime.api.message.Error,org.mule.runtime.api.message.Message> send(String url, org.mule.runtime.api.message.Message message, OperationOptions operationOptions) throws org.mule.runtime.api.exception.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.org.mule.runtime.api.exception.MuleExceptionpublic Either<org.mule.runtime.api.message.Error,org.mule.runtime.api.message.Message> send(String url, Object payload, Map<String,Serializable> messageProperties, long timeout) throws org.mule.runtime.api.exception.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.org.mule.runtime.api.exception.MuleExceptionpublic Either<org.mule.runtime.api.message.Error,org.mule.runtime.api.message.Message> send(String url, org.mule.runtime.api.message.Message message, long timeout) throws org.mule.runtime.api.exception.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.org.mule.runtime.api.exception.MuleExceptionprotected org.mule.runtime.api.message.Message createMessage(Object payload, Map<String,Serializable> messageProperties)
public void dispatch(String url, org.mule.runtime.api.message.Message message) throws org.mule.runtime.api.exception.MuleException
MuleClientdispatch in interface MuleClienturl - the Mule URL used to determine the destination and transport of the messagemessage - the message to sendorg.mule.runtime.api.exception.MuleExceptionpublic void dispatch(String url, org.mule.runtime.api.message.Message message, OperationOptions operationOptions) throws org.mule.runtime.api.exception.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 operationorg.mule.runtime.api.exception.MuleExceptionpublic Either<org.mule.runtime.api.message.Error,Optional<org.mule.runtime.api.message.Message>> request(String url, long timeout) throws org.mule.runtime.api.exception.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 receivedorg.mule.runtime.api.exception.MuleExceptionprotected Event createMuleEvent(org.mule.runtime.api.message.Message message) throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.