communication
Interface ICommunication

All Known Implementing Classes:
CommunicationElement, ProxyCommunication, ReliableCommElt, UnreliableCommElt

public interface ICommunication

Communication operations for sending and receiving messages. For message received methods, the identifier of the message sender is precised in the received message.


Method Summary
 Message asynchReceiveMessage()
          Return a received message coming from any remote process.
 boolean availableMessage()
          Check if there is unread received messages
 void sendMessage(Message msg)
          Send a message to a remote process which address is embedded in the message.
 void sendMessage(ProcessIdentifier id, java.lang.Object data)
          Send a message to a remote process.
 Message synchReceiveMessage()
          Return a received message coming from any remote process.
 

Method Detail

sendMessage

void sendMessage(Message msg)
                 throws CommunicationException
Send a message to a remote process which address is embedded in the message.

Parameters:
msg - the message to send
Throws:
CommunicationException - in case of communication error

sendMessage

void sendMessage(ProcessIdentifier id,
                 java.lang.Object data)
                 throws CommunicationException
Send a message to a remote process.

Parameters:
id - the identifier, including its physical address, of the remote process
data - the data to send to the remote process
Throws:
CommunicationException - in case of communication error

synchReceiveMessage

Message synchReceiveMessage()
Return a received message coming from any remote process. If no unread message is available wait for the reception of a message.

Returns:
the next unread received message

asynchReceiveMessage

Message asynchReceiveMessage()
Return a received message coming from any remote process. If no unread message is available return directly the null value.

Returns:
the next unread received message or null if none

availableMessage

boolean availableMessage()
Check if there is unread received messages

Returns:
true if there is at least one unread received message, false otherwise