public class MonitorRoleSimulator extends RoleSimulator
Constructor and Description |
---|
MonitorRoleSimulator() |
Modifier and Type | Method and Description |
---|---|
void |
close(SimulatorContext context)
This method closes the role simulator.
|
String |
getModule()
This method returns the local module to be monitored.
|
String |
getProtocol()
This method returns the protocol to be monitored.
|
String |
getRole()
This method returns the role within the module to be monitored.
|
void |
init(SimulatorContext context)
This method initializes the role simulator.
|
boolean |
receive(SimulatorContext context,
Message mesg,
String fromRole)
This method simulates the receiving of a message.
|
boolean |
send(SimulatorContext context,
Message mesg,
String toRole)
This method simulates the sending of a message.
|
MonitorRoleSimulator |
setModule(String module)
This method sets the local module to be monitored.
|
MonitorRoleSimulator |
setProtocol(String protocol)
This method sets the protocol to be monitored.
|
MonitorRoleSimulator |
setRole(String role)
This method sets the role within the module to be monitored.
|
public String getModule()
public MonitorRoleSimulator setModule(String module)
module
- The local modulepublic String getRole()
public MonitorRoleSimulator setRole(String role)
role
- The rolepublic String getProtocol()
public MonitorRoleSimulator setProtocol(String protocol)
protocol
- The protocolpublic void init(SimulatorContext context)
init
in class RoleSimulator
context
- The contextpublic boolean send(SimulatorContext context, Message mesg, String toRole)
send
in class RoleSimulator
context
- The contextmesg
- The messagetoRole
- The target rolepublic boolean receive(SimulatorContext context, Message mesg, String fromRole)
receive
in class RoleSimulator
context
- The contextmesg
- The messagefromRole
- The source rolepublic void close(SimulatorContext context)
close
in class RoleSimulator
context
- The contextCopyright © 2014. All Rights Reserved.