All Packages Class Hierarchy This Package Previous Next Index
Class iBus.layers.SEQCHK
java.lang.Object
|
+----iBus.ProtocolObject
|
+----iBus.layers.SEQCHK
- public class SEQCHK
- extends ProtocolObject
SEQCHK: debugging protocol object to check sequence numbers. Aborts
in case a message is received out of sequence.
POSITION IN STACK:
-
Above any reliable stack. E.g., above FIFO
DESIGN:
-
SEQCHK is designed much like FIFO.
EVENTS PRODUCED:
EVENTS HANDLED:
-
Event.evMessage: check sequence numbers
-
Event.evView: to know when a sender joins or leaves, resp.
-
SEQCHK()
- Creates a protocol object and assigns a name to it.
-
dnInit()
- Initialize the protocol object after the protocol stack has been
created.
-
dnSubscribe(iBusURL)
- Called by the object above to subscribe to a channel.
-
dnUnsubscribe(iBusURL)
- Called by the object above or by an iBus application to unsubscribe
from a certain channel.
-
upHandleEvent(Event)
- Called by the protocol object beneath to pass an event up to me.
SEQCHK
public SEQCHK()
- 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
dnSubscribe
public synchronized void dnSubscribe(iBusURL channel) throws AlreadySubscribed, CommException
- Called by the object above to subscribe to a channel.
allocates a Hashtable of SEQCHK_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
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
upHandleEvent
public void upHandleEvent(Event event)
- Called by the protocol object beneath to pass an event up to me.
Implements SEQCHK-ness of message events. Duplicates are discarded.
- Parameters:
- event - determines the type of event
- Overrides:
- upHandleEvent in class ProtocolObject
All Packages Class Hierarchy This Package Previous Next Index