org.objectweb.jonathan.protocols.rtp
Class RTPProtocol

java.lang.Object
  extended byorg.objectweb.jonathan.protocols.rtp.RTPProtocol
All Implemented Interfaces:
Protocol

public class RTPProtocol
extends Object
implements Protocol

RTPProtocol is a partial implementation of the RTP protocol. It is an invocation protocol allowing the emission of one-way requests packaged within RTP packets. Requests whose size exceeds the mtu of the underlying transport are fragmented and reassembled. The semantics of this protocol depends on the specific transport protocol on top of which it is plugged. RTPProtocol, proper, is unreliable and unordered


Field Summary
static byte INVOC_PAYLOAD
          our proprietary payload constant
static int rtp_version
          the version of RTP supported
 
Constructor Summary
RTPProtocol(int mtu)
          Builds a new RTPProtocol instance
 
Method Summary
 Protocol createProtocol(NamingContext adapter)
           
 ProtocolGraph createProtocolGraph(ProtocolGraph[] lower, org.objectweb.jonathan.apis.kernel.Context hints)
          Creates a new protocol graph with a number of given sub protocol graphs.
 SessionIdentifier createSessionIdentifier(Properties info, SessionIdentifier[] next)
          Creates a new session identifier with the provided info
 boolean isAnInvocationProtocol()
          Returns true if the target protocol is an invocation protocol.
 ProtocolGraph newProtocolGraph(ProtocolGraph next)
          Builds a new RTP ProtocolGraph
 SessionIdentifier newSessionIdentifier(SessionIdentifier next)
          Builds a new RTP SessionIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rtp_version

public static final int rtp_version
the version of RTP supported

See Also:
Constant Field Values

INVOC_PAYLOAD

public static final byte INVOC_PAYLOAD
our proprietary payload constant

See Also:
Constant Field Values
Constructor Detail

RTPProtocol

public RTPProtocol(int mtu)
Builds a new RTPProtocol instance

Parameters:
mtu - the mtu that the RTPProtocol will assume for fragmenting messages
Method Detail

isAnInvocationProtocol

public boolean isAnInvocationProtocol()
Description copied from interface: Protocol
Returns true if the target protocol is an invocation protocol.

An invocation protocol is a protocol able to handle invocations, i.e., requests expecting a reply. In practice, this means that calls to the prepareInvocation method on sessions obtained from the target protocol will not raise an InternalException, but perform the appropriate work.

Specified by:
isAnInvocationProtocol in interface Protocol
Returns:
true if the target protocol is an invocation protocol.

newSessionIdentifier

public SessionIdentifier newSessionIdentifier(SessionIdentifier next)
Builds a new RTP SessionIdentifier

Parameters:
next - the lower level session identifier
Returns:
a new RTP SessionIdentifier.

createSessionIdentifier

public SessionIdentifier createSessionIdentifier(Properties info,
                                                 SessionIdentifier[] next)
Description copied from interface: Protocol
Creates a new session identifier with the provided info

Specified by:
createSessionIdentifier in interface Protocol

newProtocolGraph

public ProtocolGraph newProtocolGraph(ProtocolGraph next)
Builds a new RTP ProtocolGraph

Parameters:
next - the lower level protocol graph.
Returns:
a new protocol graph.

createProtocolGraph

public ProtocolGraph createProtocolGraph(ProtocolGraph[] lower,
                                         org.objectweb.jonathan.apis.kernel.Context hints)
                                  throws org.objectweb.jonathan.apis.kernel.JonathanException
Description copied from interface: Protocol
Creates a new protocol graph with a number of given sub protocol graphs.

Specified by:
createProtocolGraph in interface Protocol
Parameters:
lower - the lower-level graphs
hints - the information req'd to build the graph
Returns:
a new ProtocolGraph
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException - if the hints or the subgraphs are invalid for this protocol

createProtocol

public Protocol createProtocol(NamingContext adapter)