public interface MessageSender
Interface used by the resource adaptor to pass messages to peer nodes, within the context of the resource adaptor entity.
Accessed via the MessageFacility
.
Modifier and Type | Method and Description |
---|---|
void |
sendBroadcast(byte[] payload)
Sends the given message asynchronously to the same resource adaptor entity on all nodes in the cluster, including the sending node.
|
void |
sendMessage(int destinationNode,
byte[] payload)
Sends the given message asynchronously to the same resource adaptor entity on the given destination node.
|
RemoteResult<?>[] |
sendRequest(byte[] payload,
boolean synchronous)
Sends the given request to the same resource adaptor entity on all nodes in the cluster, including the sending node.
|
RemoteResult<?> |
sendRequest(int destinationNode,
byte[] payload,
boolean synchronous)
Sends the given request to the same resource adaptor entity on the given destination node.
|
void sendMessage(int destinationNode, byte[] payload) throws IOException
Sends the given message asynchronously to the same resource adaptor entity on the given destination node.
destinationNode
- the destination node.payload
- the message.IOException
- if an error occurs trying to send the request.void sendBroadcast(byte[] payload) throws IOException
Sends the given message asynchronously to the same resource adaptor entity on all nodes in the cluster, including the sending node.
payload
- the message.IOException
- if an error occurs trying to send the request.RemoteResult<?> sendRequest(int destinationNode, byte[] payload, boolean synchronous) throws IOException
Sends the given request to the same resource adaptor entity on the given destination node.
destinationNode
- the destination node.payload
- the request message.synchronous
- flag indicating whether the request should be sent synchronously (true) or asynchronously (false). A synchronous request will only return control to the calling thread once a result has been received from the destination node.IOException
- if an error occurs trying to send the request.RemoteResult<?>[] sendRequest(byte[] payload, boolean synchronous) throws IOException
Sends the given request to the same resource adaptor entity on all nodes in the cluster, including the sending node.
payload
- the request message.synchronous
- flag indicating whether the request should be sent synchronously (true) or asynchronously (false). A synchronous request will only return control to the calling thread when results have been received from all nodes.IOException
- if an error occurs trying to send the request.