public final class NcsMessageEnvironment extends Object implements MessageEnvironment
BLOCK_MANAGER_MASTER_MESSAGE_LISTENER_ID, EXECUTOR_MESSAGE_LISTENER_ID, MASTER_COMMUNICATION_ID, RUNTIME_MASTER_MESSAGE_LISTENER_ID| Modifier and Type | Method and Description | 
|---|---|
<T> Future<MessageSender<T>> | 
asyncConnect(String receiverId,
            String listenerId)
Asynchronously connect to the node called  
receiverId and return a future of MessageSender
 that sends messages to the listener with listenerId. | 
void | 
close()
Close this message environment. 
 | 
String | 
getId()  | 
void | 
removeListener(String listenerId)
Remove the  
MessageListener bound to a specific listener ID. | 
<T> void | 
setupListener(String listenerId,
             MessageListener<T> listener)
Set up a  
MessageListener with a listener id. | 
public <T> void setupListener(String listenerId, MessageListener<T> listener)
MessageEnvironmentMessageListener with a listener id.setupListener in interface MessageEnvironmentT - The type of the message to be sent in the environmentlistenerId - an identifier of the message listenerlistener - a message listenerpublic void removeListener(String listenerId)
MessageEnvironmentMessageListener bound to a specific listener ID.removeListener in interface MessageEnvironmentlistenerId - the ID of the listener to remove.public <T> Future<MessageSender<T>> asyncConnect(String receiverId, String listenerId)
MessageEnvironmentreceiverId and return a future of MessageSender
 that sends messages to the listener with listenerId.asyncConnect in interface MessageEnvironmentT - The type of the message to be sent in the environmentreceiverId - a receiver idlistenerId - an identifier of the message listenerpublic String getId()
public void close()
           throws Exception
MessageEnvironmentclose in interface MessageEnvironmentException - while closingCopyright © 2018. All rights reserved.