cgl.narada.transport.multicast
Class MulticastLinkFactory

java.lang.Object
  extended by cgl.narada.transport.multicast.MulticastLinkFactory
All Implemented Interfaces:
LinkFactory, TransportDebugFlags

public class MulticastLinkFactory
extends Object
implements LinkFactory, TransportDebugFlags

This is a multicast implementation of the LinkFactory Interface. No properties need to be setup during the initialization of the MulticastLink Factory. To enable receipt and sending of data to a given multicast group the user needs to specify the MulticastHost (which must be a valid multicast address) and MulticastPort information.


Field Summary
 
Fields inherited from interface cgl.narada.transport.TransportDebugFlags
IPSecLink_Debug, IPSecLinkFactory_Debug, IPSecReceiverThread_Debug, IPSecSenderThread_Debug, IPSecServerThread_Debug, MulticastLink_Debug, MulticastLinkFactory_Debug, MulticastReceiverThread_Debug, MulticastSenderThread_Debug, NIOTCPLink_Debug, NIOTCPLinkFactory_Debug, NIOTCPReceiverThread_Debug, NIOTCPSenderThread_Debug, NIOTCPServerThread_Debug, PoolTCPLink_Debug, PoolTCPLinkFactory_Debug, PoolTCPLinkReceiver_Debug, PoolTCPLinkSender_Debug, PoolTCPServerThread_Debug, PTCPLink_Debug, PTCPLinkFactory_Debug, PTCPReceiverThread_Debug, PTCPSenderThread_Debug, PTCPServerThread_Debug, ReceiveTask_Debug, RTPLink_Debug, RTPLinkFactory_Debug, RTPReceiverThread_Debug, RTPSenderThread_Debug, SendTask_Debug, TCPLink_Debug, TCPLinkFactory_Debug, TCPReceiverThread_Debug, TCPSenderThread_Debug, TCPServerThread_Debug, TransmissionManager_Debug, TransportHandlerImpl_Debug, UDPLink_Debug, UDPLinkFactory_Debug, UDPReceiverThread_Debug, UDPSenderThread_Debug
 
Constructor Summary
MulticastLinkFactory()
           
 
Method Summary
 boolean canManageLinkMigrationOfType(String linkType)
          Indicates if this factory can manage migration of links of a certain type
 Link createLink(Properties linkProperties)
          Create a communication link based on the properties that have been specified.
 void dispose()
          This method is used to garbage collect any resources associated with the link factory
 String getManagedLinksType()
          Return the type of all the links created/managed by this factory
 TransportHandler getTransportHandler()
           
 void handleInboundMulticastLinkRequest(InetAddress remoteAddress, int remotePort)
           
 boolean loadLinkFactoryServices()
          Starts communication services.
static void main(String[] args)
           
 void manageLinkMigration(Link link)
          Used to migrate communications of a link to the one supported by links managed by this factory
 void reportLinkLoss(Link linkLost)
           
 void setLinkFactoryProperties(Properties factoryProperties)
           
 void setLinkStatusInterval(long interval)
          Set the interval for checking status of all links managed by this factory to the one specified in the argument
 void setTransportHandler(TransportHandler transportHandler)
          Sets the reference to the transport handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MulticastLinkFactory

public MulticastLinkFactory()
Method Detail

setLinkFactoryProperties

public void setLinkFactoryProperties(Properties factoryProperties)
Specified by:
setLinkFactoryProperties in interface LinkFactory

getManagedLinksType

public String getManagedLinksType()
Return the type of all the links created/managed by this factory

Specified by:
getManagedLinksType in interface LinkFactory

createLink

public Link createLink(Properties linkProperties)
                throws TransportException
Create a communication link based on the properties that have been specified.

Specified by:
createLink in interface LinkFactory
Throws:
TransportException

setLinkStatusInterval

public void setLinkStatusInterval(long interval)
Set the interval for checking status of all links managed by this factory to the one specified in the argument

Specified by:
setLinkStatusInterval in interface LinkFactory

loadLinkFactoryServices

public boolean loadLinkFactoryServices()
                                throws TransportException
Starts communication services. In this case what we do is start the MulticastListener thread, which listens to datagram packets arriving at the MulticastListenerPort

Specified by:
loadLinkFactoryServices in interface LinkFactory
Throws:
TransportException

canManageLinkMigrationOfType

public boolean canManageLinkMigrationOfType(String linkType)
Indicates if this factory can manage migration of links of a certain type

Specified by:
canManageLinkMigrationOfType in interface LinkFactory

manageLinkMigration

public void manageLinkMigration(Link link)
                         throws TransportException
Used to migrate communications of a link to the one supported by links managed by this factory

Specified by:
manageLinkMigration in interface LinkFactory
Throws:
TransportException

setTransportHandler

public void setTransportHandler(TransportHandler transportHandler)
Sets the reference to the transport handler. This is done during the loadLinkFactory() operation within the transport handler implementations.

Specified by:
setTransportHandler in interface LinkFactory

dispose

public void dispose()
This method is used to garbage collect any resources associated with the link factory

Specified by:
dispose in interface LinkFactory

handleInboundMulticastLinkRequest

public void handleInboundMulticastLinkRequest(InetAddress remoteAddress,
                                              int remotePort)

reportLinkLoss

public void reportLinkLoss(Link linkLost)

getTransportHandler

public TransportHandler getTransportHandler()

main

public static void main(String[] args)


For comments and suggestions please send e-mail to The NaradaBrokering Project