All Packages Class Hierarchy This Package Previous Next Index
Class iBus.layers.BADNET
java.lang.Object
|
+----iBus.ProtocolObject
|
+----iBus.layers.BADNET
- public class BADNET
- extends ProtocolObject
BADNET duplicates, reorders, and trows away messages. This class
is needed for testing iBus Protocol Objects.
PARAMETERS:
-
lossrate: >= 0 and <= 100: the percentage of messages to lose.
Default: 10
-
duplrate: >= 0 and <= 100: the percentage of messages to duplicate.
Default: 10
-
duplicate: 0/1: whether to duplicate messages or not.
Default: 1
-
lossbatch: > 0: how many message to lose in a row.
Default: 1
POSITION IN STACK:
EVENTS PRODUCED:
-
a message event from time to time to simulate message duplication
EVENTS HANDLED:
EVENTS CONSUMED:
-
a message event from time to time to simulate message loss
-
BADNET()
- Creates a protocol object and assigns a name to it.
-
dnInit()
- Initialize the protocol object after the protocol stack has been
created.
-
upHandleEvent(Event)
- Called by the protocol object below to pass an event up to me.
BADNET
public BADNET()
- Creates a protocol object and assigns a name to it.
dnInit
public synchronized void dnInit()
- Initialize the protocol object after the protocol stack has been
created. Also checks that the right parameters were given to the
protocol object.
- Overrides:
- dnInit in class ProtocolObject
upHandleEvent
public void upHandleEvent(Event event)
- Called by the protocol object below to pass an event up to me.
An event can be the arrival of a posting, the detection of a failure,
a flow control request, etc.
- Parameters:
- event - determines the type of event
- Overrides:
- upHandleEvent in class ProtocolObject
All Packages Class Hierarchy This Package Previous Next Index