@Deprecated public class MessageTransportService extends Object
The implementation of this MTS assumes that only one kernel is available. It does not support more than one kernel and network communication.
Constructor and Description |
---|
MessageTransportService()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected KernelIdentifier |
getKernelId()
Deprecated.
Replies the identifier of a kernel.
|
Message |
getNextMessage(AgentIdentifier id)
Deprecated.
Replies the next available message for the specified agent.
|
protected boolean |
hasMessage(AgentIdentifier id)
Deprecated.
Replies if a message is available for the specified agent.
|
(package private) void |
registerAgent(AgentIdentifier id)
Deprecated.
Create a local message box for the specified agent.
|
protected boolean |
registerInLocalBoxes(Message m)
Deprecated.
Store the specified message inside the local message boxes.
|
boolean |
send(Message m)
Deprecated.
Send the specified message according to the
knownledge of this MTS.
|
void |
startMTS()
Deprecated.
Invoked by the kernel when the MTS should start.
|
void |
stopMTS()
Deprecated.
Invoked by the kernel when the MTS should stop.
|
(package private) void |
unregisterAgent(AgentIdentifier id)
Deprecated.
Delete the local message box of the specified agent.
|
public void stopMTS()
public void startMTS()
void registerAgent(AgentIdentifier id)
void unregisterAgent(AgentIdentifier id)
public boolean send(Message m)
protected boolean registerInLocalBoxes(Message m)
true
if the message was successfully stored,
otherwise false
public Message getNextMessage(AgentIdentifier id)
This method consumes the message. It means that the message will never be obtain another time.
id
- is the identifier of the agent for which the message was extracted.null
if none availableprotected boolean hasMessage(AgentIdentifier id)
This method does not consume the message.
id
- is the identifier of the agent for which the message was extracted.true
if a message is available, otherwise false
protected KernelIdentifier getKernelId()
This method is invoked by the kernel to obtain its own identifier.
Copyright © 2003-2013 Arakhnê.org Members. All rights reserved under LGPL license terms.