peersim.edsim
Interface EDProtocol<T>

All Superinterfaces:
java.lang.Cloneable, Protocol
All Known Implementing Classes:
AverageED

public interface EDProtocol<T>
extends Protocol

The interface to be implemented by protocols run under the event-driven model. A single method is provided, to deliver events to the protocol.


Method Summary
 void processEvent(Node node, int pid, T event)
          This method is invoked by the scheduler to deliver events to the protocol.
 
Methods inherited from interface peersim.core.Protocol
clone
 

Method Detail

processEvent

void processEvent(Node node,
                  int pid,
                  T event)
This method is invoked by the scheduler to deliver events to the protocol. Apart from the event object, information about the node and the protocol identifier are also provided. Additional information can be accessed through the CommonState class.

Parameters:
node - the local node
pid - the identifier of this protocol
event - the delivered event