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. |
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 nodepid
- the identifier of this protocolevent
- the delivered event