All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class iBus.layers.FIFO

java.lang.Object
   |
   +----iBus.ProtocolObject
           |
           +----iBus.layers.FIFO

public class FIFO
extends ProtocolObject

FIFO: protocol object that implements first-in-first-out ordering and duplicate elimination

FIFO receives a stream of message events from beneath. It eliminates any duplicate and orders messages according to their sequence numbers. FIFO assumes that each message is passed up at least once. It does not implement any loss recovery protocol as this is handled by the layers below.

POSITION IN STACK:

DESIGN:

EVENTS PRODUCED:

EVENTS HANDLED:

EVENTS CONSUMED:


Constructor Index

 o FIFO()
Creates a protocol object and assigns a name to it.

Method Index

 o dnInit()
Initialize the protocol object after the protocol stack has been created.
 o dnSubscribe(iBusURL)
Called by the object above to subscribe to a channel.
 o dnUnsubscribe(iBusURL)
Called by the object above or by an iBus application to unsubscribe from a certain channel.
 o getOutOfOrderHi(iBusURL, iBusURL)
Returns the outOfOrderHi property for a given channel/sender combination.
 o upHandleEvent(Event)
Called by the protocol object beneath to pass an event up to me.

Constructors

 o FIFO
 public FIFO()
Creates a protocol object and assigns a name to it.

Methods

 o 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. FIFO_test uses this function to reinitialize the object.

Overrides:
dnInit in class ProtocolObject
 o dnSubscribe
 public synchronized void dnSubscribe(iBusURL channel) throws AlreadySubscribed, CommException
Called by the object above to subscribe to a channel. allocates a Hashtable of FIFO_SenderInfo objects for that channel. That Hashtable is put into the senders_ Hashtable.

Parameters:
channel - the channel to subscribe to
Throws: AlreadySubscribed
if this stack is already subscribed to the channel
Throws: CommException
in case of a communication error
Overrides:
dnSubscribe in class ProtocolObject
 o dnUnsubscribe
 public synchronized void dnUnsubscribe(iBusURL channel) throws NotSubscribed, CommException
Called by the object above or by an iBus application to unsubscribe from a certain channel. Deallocates the Hashtable in senders_.

Parameters:
channel - the channel to unsubscribe from
Throws: NotSubscribed
if this stack is not subscribed to the channel
Throws: CommException
in case of a communication error
Overrides:
dnUnsubscribe in class ProtocolObject
 o upHandleEvent
 public void upHandleEvent(Event event)
Called by the protocol object beneath to pass an event up to me. Implements FIFO-ness of message events. Duplicates are discarded.

Parameters:
event - determines the type of event
Overrides:
upHandleEvent in class ProtocolObject
 o getOutOfOrderHi
 public synchronized long getOutOfOrderHi(iBusURL channel,
                                          iBusURL sender) throws Exception
Returns the outOfOrderHi property for a given channel/sender combination. This is needed for the FIFO_test driver.

Parameters:
channel - the channel in question
sender - the sender on the channel
Returns:
the outOfOrderHi property for channel/sender
Throws: Exception
in case channel/sender does not exist

All Packages  Class Hierarchy  This Package  Previous  Next  Index