fr.lifl.genca.centralised
Class CentralisedCommunicator
java.lang.Object
fr.lifl.genca.centralised.CentralisedCommunicator
- All Implemented Interfaces:
- Communicator
- public class CentralisedCommunicator
- extends java.lang.Object
- implements Communicator
This class provides a communicator for a centralised application, where the communicator sends a message when it is its turn.
- Author:
- Marie-Hélène Verrons
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
myServer
protected AgentServer myServer
outBox
protected java.util.Vector outBox
myName
protected java.lang.String myName
CentralisedCommunicator
public CentralisedCommunicator(AgentServer as,
java.lang.String n)
sendToServer
public void sendToServer(ServerMessage msg)
- Description copied from interface:
Communicator
- for an agent to send a message to the names server
- Specified by:
sendToServer
in interface Communicator
- Parameters:
msg
- the message to send
sendOneMessage
public void sendOneMessage()
sendToAgent
public void sendToAgent(java.lang.Object to,
ServerMessage msg)
- to send a message to one participant (synchronous). Must call
the method receiveMessage of the Negotiator of the agent.
- Specified by:
sendToAgent
in interface Communicator
- Parameters:
to
- the user/agent addressmsg
- the content of the mesage