peersim.dynamics
Class WireByMethod

java.lang.Object
  extended by peersim.dynamics.WireGraph
      extended by peersim.dynamics.WireByMethod
All Implemented Interfaces:
Control

public class WireByMethod
extends WireGraph

Takes a Linkable protocol and adds connections using an arbitrary method. No connections are removed. The connections are added by an arbitrary method that can be specified in the configuration. The properties the method has to fulfill are the following

The arguments are initialized using the configuration as follows. For example, the class WireWS can be emulated by configuring
 init.0 WireByMethod
 init.0.class GraphFactory
 init.0.method wireWS
 init.0.arg1 10
 init.0.arg2 0.1
 ...
 
Note that the "class" parameter defaults to GraphFactory, and "method" defaults to "wire".


Parameter Summary
arg
          The prefix for the configuration properties that describe parameters.
class
          The class that has the method we want to use.
method
          The name of the method for wiring the graph.
 
Field Summary
 
Fields inherited from class peersim.dynamics.WireGraph
g, pid, undir
 
Constructor Summary
WireByMethod(java.lang.String prefix)
          Loads configuration.
 
Method Summary
 void wire(Graph g)
          Invokes the method passing g to it.
 
Methods inherited from class peersim.dynamics.WireGraph
execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Parameter Detail

arg

The prefix for the configuration properties that describe parameters.


class

The class that has the method we want to use. Defaults to GraphFactory.


method

The name of the method for wiring the graph. Defaults to wire.

Constructor Detail

WireByMethod

public WireByMethod(java.lang.String prefix)
Loads configuration. It verifies the constraints defined in WireByMethod.

Parameters:
prefix - the configuration prefix for this class
Method Detail

wire

public void wire(Graph g)
Invokes the method passing g to it.

Specified by:
wire in class WireGraph