|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeersim.dynamics.MethodInvoker
public class MethodInvoker
This Control
invokes a specified method on a protocol.
The method is defined by config parameter "method" and
the protocol is by "protocol". The method must not have any
parameters and must return void. If no protocol is specified, then the
method will be invoked on all protocol in the protocol stack that define
it.
Although the method cannot have any parameters, it can of course read
CommonState
. It is guaranteed that the state is up-to-date,
inlcuding eg method CommonState.getNode()
.
Parameter Summary | |
---|---|
protocol
The protocol to operate on. |
|
method
The method to be invoked. |
Constructor Summary | |
---|---|
MethodInvoker(java.lang.String prefix)
Standard constructor that reads the configuration parameters. |
Method Summary | |
---|---|
boolean |
execute()
Invokes method on all the nodes. |
void |
initialize(Node n)
Invokes method on given node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Parameter Detail |
---|
protocol
method
Constructor Detail |
---|
public MethodInvoker(java.lang.String prefix)
prefix
- the configuration prefix for this classMethod Detail |
---|
public boolean execute()
execute
in interface Control
public void initialize(Node n)
initialize
in interface NodeInitializer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |