All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class iBus.layers.FRAG

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

public class FRAG
extends ProtocolObject
FRAG fragments and reassembles messages that are larger than a certain size. To that purpose FRAG assigns fragment IDs (0 - n-1) to the fragments of an outgoing message. The fragment size can be specified as part of a QOS string. The default size matches a UDP datagram size.

For assembling fragments to messages, FRAG maintains one incoming queue per senderURL/channelURL combination.

PARAMETERS:

POSITION IN STACK:

EVENTS PRODUCED:

EVENTS HANDLED:

EVENTS CONSUMED:


Variable Index

 o fragSize_

Constructor Index

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

Method Index

 o dnBytesAdded(MessageEvent)
Called by protocol objects such as FRAG to find out how many bytes will be constantly added to the message by the protocol objects below.
 o dnInit()
Initialize the protocol object after the protocol stack has been created.
 o dnPush(iBusURL, MessageEvent)
Called by the object above to send ``data'' to ``dest'' using multicast or unicast communication, depending on the URL:
 o getFragSize()
Get the fragment size property.
 o upHandleEvent(Event)
Called by the protocol object below to pass an event up to me.

Variables

 o fragSize_
 protected int fragSize_

Constructors

 o FRAG
 public FRAG()
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.

Overrides:
dnInit in class ProtocolObject
 o dnPush
 public void dnPush(iBusURL dest,
                    MessageEvent msg) throws CommException, NotRegistered
Called by the object above to send ``data'' to ``dest'' using multicast or unicast communication, depending on the URL:

Parameters:
dest - the destination of the posting
msg - the message to be sent
Throws: CommException
on communication failure
Throws: NotRegistered
in case registerTalker was not called for the channel
Overrides:
dnPush in class ProtocolObject
 o dnBytesAdded
 public int dnBytesAdded(MessageEvent msg)
Called by protocol objects such as FRAG to find out how many bytes will be constantly added to the message by the protocol objects below. (Only protocol objects that may be placed below FRAG need to implement this function).

Parameters:
msg - the message to which the bytes will be added.
Returns:
the number of bytes that a protocol object constantly adds to messages.
Overrides:
dnBytesAdded in class ProtocolObject
 o 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
 o getFragSize
 public int getFragSize()
Get the fragment size property.

Returns:
the fragment size property

All Packages  Class Hierarchy  This Package  Previous  Next  Index