org.objectweb.jonathan.protocols.multicast_ip
Class MulticastIpProtocol

java.lang.Object
  extended by org.objectweb.jonathan.protocols.multicast_ip.MulticastIpProtocol
All Implemented Interfaces:
Protocol

public class MulticastIpProtocol
extends Object
implements Protocol

The MulticastIpProtocol class is a protocol class encapsulating the IP Multicast protocol. Each Session created by this class is dedicated to a (IP multicast address, port) network endpoint. A simple threading model is used: a thread is dedicated to each Session created by MulticastIpProtocol.

See Also:
Protocol

Constructor Summary
MulticastIpProtocol(MarshallerFactory marshaller_factory)
          Build a new MulticastIpProtocol
 
Method Summary
 Protocol createProtocol(NamingContext adapter)
           
 ProtocolGraph createProtocolGraph(ProtocolGraph[] subgraphs, 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
 int getMtu()
          Returns the MulticastIpProtocol MTU (maximum transmition unit).
 boolean isAnInvocationProtocol()
          Returns false
 ProtocolGraph newProtocolGraph(String address, int port)
          Builds a new Protocol graph associated with an (IP multicast address, port) pair
 SessionIdentifier newSessionIdentifier(String address, int port)
          Builds a new SessionIdentifier associated with an (IP multicast address, port) pair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MulticastIpProtocol

public MulticastIpProtocol(MarshallerFactory marshaller_factory)
Build a new MulticastIpProtocol

Parameters:
marshaller_factory - the MarshallerFactory used by the protocol to build incoming messages
Method Detail

isAnInvocationProtocol

public boolean isAnInvocationProtocol()
Returns false

Specified by:
isAnInvocationProtocol in interface Protocol
Returns:
false

getMtu

public int getMtu()
Returns the MulticastIpProtocol MTU (maximum transmition unit). The upper protocol must make sure to supply messages to MulticastIpProtocol whose size does not exceed this MTU, otherwise messages will be truncated

Returns:
the MulticastIpProtocol MTU (maximum transmition unit)

newSessionIdentifier

public SessionIdentifier newSessionIdentifier(String address,
                                              int port)
                                       throws CommunicationException
Builds a new SessionIdentifier associated with an (IP multicast address, port) pair

Returns:
the created SessionIdentifier
Throws:
CommunicationException - raised if the supplied parameters do not correspond to a valid IP multicast address

createSessionIdentifier

public SessionIdentifier createSessionIdentifier(Properties info,
                                                 SessionIdentifier[] next)
                                          throws org.objectweb.jonathan.apis.kernel.JonathanException
Description copied from interface: Protocol
Creates a new session identifier with the provided info

Specified by:
createSessionIdentifier in interface Protocol
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException

newProtocolGraph

public ProtocolGraph newProtocolGraph(String address,
                                      int port)
                               throws CommunicationException
Builds a new Protocol graph associated with an (IP multicast address, port) pair

Returns:
the created graph
Throws:
CommunicationException - raised if the supplied parameters do not correspond to a valid IP multicast address

createProtocolGraph

public ProtocolGraph createProtocolGraph(ProtocolGraph[] subgraphs,
                                         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:
subgraphs - 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)