peersim.core
Class ModifiableNode

java.lang.Object
  extended by peersim.core.GeneralNode
      extended by peersim.core.ModifiableNode
All Implemented Interfaces:
java.lang.Cloneable, Fallible, Node

public class ModifiableNode
extends GeneralNode

This class extends GeneralNode by allowing to modify single protocol instances at nodes.


Parameter Summary
 
Parameters inherited from interface peersim.core.Node
protocol
 
Field Summary
 
Fields inherited from class peersim.core.GeneralNode
failstate, protocol
 
Fields inherited from interface peersim.core.Fallible
DEAD, DOWN, OK
 
Constructor Summary
ModifiableNode(java.lang.String prefix)
          Invokes the super constructor.
 
Method Summary
 void setProtocol(int pid, Protocol prot)
          Substitutes the specified protocol at this node.
 
Methods inherited from class peersim.core.GeneralNode
clone, getFailState, getID, getIndex, getProtocol, hashCode, isUp, protocolSize, setFailState, setIndex, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModifiableNode

public ModifiableNode(java.lang.String prefix)
Invokes the super constructor.

Method Detail

setProtocol

public void setProtocol(int pid,
                        Protocol prot)
Substitutes the specified protocol at this node.

Parameters:
pid - protocol identifier
prot - the protocol object