public interface Messenger
Modifier and Type | Method and Description |
---|---|
void |
addMessageListener(long topic,
MessageListener listener)
Adds a message listener on a
lonng topic. |
void |
addMessageListener(String topic,
MessageListener listener)
Adds a message listener on a
String topic. |
long |
createTopic()
Returns a new topic.
|
void |
removeMessageListener(long topic,
MessageListener listener)
Removes a message listener from a
lonng topic. |
void |
removeMessageListener(String topic,
MessageListener listener)
Removes a message listener from a
String topic. |
void |
send(short node,
long topic,
byte[] data)
Sends a message to a known node, on a
long topic. |
void |
send(short node,
long topic,
Streamable data)
Sends a message to a known node, on a
long topic. |
void |
send(short node,
String topic,
byte[] data)
Sends a message to a known node, on a
String topic. |
void |
send(short node,
String topic,
Streamable data)
Sends a message to a known node, on a
String topic. |
void |
sendToOwnerOf(long ref,
long topic,
byte[] data)
Sends a message to a the owner of a known grid object node, on a
long topic. |
void |
sendToOwnerOf(long ref,
long topic,
Streamable data)
Sends a message to a the owner of a known grid object node, on a
long topic. |
void |
sendToOwnerOf(long ref,
String topic,
byte[] data)
Sends a message to a the owner of a known grid object node, on a
String topic. |
void |
sendToOwnerOf(long ref,
String topic,
Streamable data)
Sends a message to a the owner of a known grid object node, on a
String topic. |
ListenableFuture<Void> |
sendToOwnerOfAsync(long ref,
long topic,
byte[] data)
Sends a message to a the owner of a known grid object node, on a
long topic. |
ListenableFuture<Void> |
sendToOwnerOfAsync(long ref,
long topic,
Streamable data)
Sends a message to a the owner of a known grid object node, on a
long topic. |
ListenableFuture<Void> |
sendToOwnerOfAsync(long ref,
String topic,
byte[] data)
Sends a message to a the owner of a known grid object node, on a
String topic. |
ListenableFuture<Void> |
sendToOwnerOfAsync(long ref,
String topic,
Streamable data)
Sends a message to a the owner of a known grid object node, on a
String topic. |
long createTopic()
void addMessageListener(long topic, MessageListener listener)
lonng
topic.topic
- The topic.listener
- The listener.void addMessageListener(String topic, MessageListener listener)
String
topic.topic
- The topic.listener
- The listener.void removeMessageListener(long topic, MessageListener listener)
lonng
topic.topic
- The topic.listener
- The listener.void removeMessageListener(String topic, MessageListener listener)
String
topic.topic
- The topic.listener
- The listener.void send(short node, String topic, byte[] data)
String
topic.node
- The node to which to send the message.topic
- The message's topic.data
- The message.void send(short node, long topic, Streamable data)
long
topic.node
- The node to which to send the message.topic
- The message's topic.data
- The message.void send(short node, String topic, Streamable data)
String
topic.node
- The node to which to send the message.topic
- The message's topic.data
- The message.void send(short node, long topic, byte[] data)
long
topic.node
- The node to which to send the message.topic
- The message's topic.data
- The message.void sendToOwnerOf(long ref, long topic, byte[] data) throws TimeoutException
long
topic.ref
- The grid ref to whose owner the message is to be sent.topic
- The message's topic.data
- The message.TimeoutException
- This exception is thrown if the operation has times-out.void sendToOwnerOf(long ref, String topic, byte[] data) throws TimeoutException
String
topic.ref
- The grid ref to whose owner the message is to be sent.topic
- The message's topic.data
- The message.TimeoutException
- This exception is thrown if the operation has times-out.void sendToOwnerOf(long ref, long topic, Streamable data) throws TimeoutException
long
topic.ref
- The grid ref to whose owner the message is to be sent.topic
- The message's topic.data
- The message.TimeoutException
- This exception is thrown if the operation has times-out.void sendToOwnerOf(long ref, String topic, Streamable data) throws TimeoutException
String
topic.ref
- The grid ref to whose owner the message is to be sent.topic
- The message's topic.data
- The message.TimeoutException
- This exception is thrown if the operation has times-out.ListenableFuture<Void> sendToOwnerOfAsync(long ref, long topic, byte[] data)
long
topic.ref
- The grid ref to whose owner the message is to be sent.topic
- The message's topic.data
- The message.ListenableFuture<Void> sendToOwnerOfAsync(long ref, String topic, byte[] data)
String
topic.ref
- The grid ref to whose owner the message is to be sent.topic
- The message's topic.data
- The message.ListenableFuture<Void> sendToOwnerOfAsync(long ref, long topic, Streamable data)
long
topic.ref
- The grid ref to whose owner the message is to be sent.topic
- The message's topic.data
- The message.ListenableFuture<Void> sendToOwnerOfAsync(long ref, String topic, Streamable data)
String
topic.ref
- The grid ref to whose owner the message is to be sent.topic
- The message's topic.data
- The message.