Appia Documentation

net.sf.appia.protocols.drop
Class DropSession

java.lang.Object
  extended by net.sf.appia.core.Session
      extended by net.sf.appia.protocols.drop.DropSession

public class DropSession
extends Session

Class DropSession randomly drops SendableEvents going down. Messages are droped randomly with the probability stated in the dropRate public attribute.

Author:
Hugo Miranda
See Also:
DropLayer, Session, SendableEvent

Field Summary
static double dropRate
          Probability of messages to be dropped.
 
Fields inherited from class net.sf.appia.core.Session
layer
 
Constructor Summary
DropSession(DropLayer l)
           
 
Method Summary
 void handle(Event e)
          This is the protocol's main event handler.
 
Methods inherited from class net.sf.appia.core.Session
boundSessions, getId, getLayer, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dropRate

public static double dropRate
Probability of messages to be dropped. This is a public static value that can be changed any time. 0 prevents messages from being lost.

Constructor Detail

DropSession

public DropSession(DropLayer l)
See Also:
Session
Method Detail

handle

public void handle(Event e)
This is the protocol's main event handler. It accepts the following events:

Overrides:
handle in class Session
Parameters:
e - the event to handle.
See Also:
Session.handle(net.sf.appia.core.Event)

Appia Documentation

COPYRIGHT 2006-2009, University of Lisbon and INESC-ID
For updates and related information please see Appia Home Page
Send questions, sugestions or remarks to the appia-users mailing list