rtpi.reliability
Interface Reliable

All Known Implementing Classes:
UnreliableUdpMulticast

public abstract interface Reliable

This describes the interface to a reliability service that is used together with RTP/I.


Field Summary
static int DETECT
          The DETECT quality of service is used when the reliability service should detect lost ADUs but should not try to repair lost ADUs.
static int NONE
          The NONE quality of service is used when the reliability service should take no actions to notice or repair lost ADUs of the given subcomponent and type pair.
static int ORDERED
          As with RELIABLE the ORDERED quality of service is used to request the reliable reception of ADUs of a given subcomponent and type pair.
static int RELIABLE
          The RELIABLE quality of service is used when the reliability service should detect and repair lost ADUs of a give subcomponent and type pair.
 
Method Summary
 int getCombinedHeaderSize()
          This returns the size of the combined RTP/I and reliability headers.
 int getTransportPayloadSize()
          This returns the size of the payload that can be transported in a single packet.
 void joinGroup()
          This joins the group used by the reliability service to communicate with peer instances (e.g. a multicast group).
 void leaveGroup()
          This leaves the group used by the reliability service to communicate with peer instances (e.g. a multicast group).
 void quit()
          This terminates the reliability service.
 void registerRecipient(ReliableRecipient rec)
          This registers the recipient of the ADUs and loss notifications.
 void setDefaultInterest(int type, int qos)
          This method is used to set a default QoS for all subcomponent and RTP/I ADU type pairs to which no other QoS has been specified.
 void setInterest(long subcomponentID, int type, int qos)
          This method is used to set the QoS for a given subcomponent and RTP/I ADU type pair.
 void transmitRtpiAdu(java.util.LinkedList packets, float redundancy, int transmissionInterval)
          This method is used to transmit an ADU.
 

Field Detail

NONE

public static final int NONE
The NONE quality of service is used when the reliability service should take no actions to notice or repair lost ADUs of the given subcomponent and type pair.

DETECT

public static final int DETECT
The DETECT quality of service is used when the reliability service should detect lost ADUs but should not try to repair lost ADUs.

RELIABLE

public static final int RELIABLE
The RELIABLE quality of service is used when the reliability service should detect and repair lost ADUs of a give subcomponent and type pair. Notice that a reliability service may not be able to recover an ADU and, in this case, will notify the recipient of the lost ADU that it was unable to recover the ADU.

ORDERED

public static final int ORDERED
As with RELIABLE the ORDERED quality of service is used to request the reliable reception of ADUs of a given subcomponent and type pair. However, the ADUs are deliverd in the same order in which they have been transmitted. This is source ordering. It does make no assertments to retain the order of ADUs that have been sent by more than one source.
Method Detail

transmitRtpiAdu

public void transmitRtpiAdu(java.util.LinkedList packets,
                            float redundancy,
                            int transmissionInterval)
                     throws QosNotSupportedException,
                            IllegalValueException
This method is used to transmit an ADU. The ADU may consist of multiple RTP/I packets if the ADU is too large to fit into a single (network) packet. The RTP/I packets MUST form a single valid RTP/I ADU. As an option the ADU may be transmitted with a certain amount of redundancy that is to be transmitted in a certain time interval to compensate for packet loss. It is important to notice that a given implementation may not support redundancy.
Parameters:
packet - A linked list of the RTP/I packets that belong to a single ADU.
redundancy - The amount of redundancy that should be added to this ADU.
transmissionInterval - The interval during which redundancy information may be transmitted.

setInterest

public void setInterest(long subcomponentID,
                        int type,
                        int qos)
                 throws QosNotSupportedException
This method is used to set the QoS for a given subcomponent and RTP/I ADU type pair. It is important to notice that a given implementation of the Reliable interface may only support certain QoS settings.
Parameters:
subcomponentID - The ID of the subcomponent.
type - The RTP/I ADU type.
qos - The desired QoS.

setDefaultInterest

public void setDefaultInterest(int type,
                               int qos)
                        throws QosNotSupportedException
This method is used to set a default QoS for all subcomponent and RTP/I ADU type pairs to which no other QoS has been specified. It is important to notice that a given implementation of the Reliable interface may only support certain QoS settings.
Parameters:
subcomponentID - The ID of the subcomponent.
type - The RTP/I ADU type.
qos - The desired QoS.

joinGroup

public void joinGroup()
This joins the group used by the reliability service to communicate with peer instances (e.g. a multicast group). This MUST be called before any ADUs can be transmitted or received.

leaveGroup

public void leaveGroup()
This leaves the group used by the reliability service to communicate with peer instances (e.g. a multicast group). After this method has been called no ADUs may be transmitted and no further ADUs can be received. However, already received ADUs may still be delivered.

registerRecipient

public void registerRecipient(ReliableRecipient rec)
This registers the recipient of the ADUs and loss notifications.
Parameters:
rec - The reipient.

quit

public void quit()
This terminates the reliability service.

getTransportPayloadSize

public int getTransportPayloadSize()
This returns the size of the payload that can be transported in a single packet. This payload size INCLUDES all RTP/I and reliability headers.
Returns:
The transport payload size.

getCombinedHeaderSize

public int getCombinedHeaderSize()
This returns the size of the combined RTP/I and reliability headers.
Returns:
The header size.