public abstract class RoleSimulator extends Object
| Constructor and Description |
|---|
RoleSimulator() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close(SimulatorContext context)
This method closes the role simulator.
|
abstract void |
init(SimulatorContext context)
This method initializes the role simulator.
|
abstract boolean |
receive(SimulatorContext context,
Message mesg,
String fromRole)
This method simulates the receiving of a message.
|
abstract boolean |
send(SimulatorContext context,
Message mesg,
String toRole)
This method simulates the sending of a message.
|
public abstract void init(SimulatorContext context)
context - The contextpublic abstract boolean send(SimulatorContext context, Message mesg, String toRole)
context - The contextmesg - The messagetoRole - The target rolepublic abstract boolean receive(SimulatorContext context, Message mesg, String fromRole)
context - The contextmesg - The messagefromRole - The source rolepublic abstract void close(SimulatorContext context)
context - The contextCopyright © 2014. All Rights Reserved.