cgl.narada.transport
Interface LinkFactory

All Known Implementing Classes:
HTTPLinkFactory, HTTPSLinkFactory, IPSecLinkFactory, LinkFactoryImpl, MulticastLinkFactory, NIOTCPLinkFactory, PoolTCPLinkFactory, PTCPLinkFactory, RTPLinkFactory, SSLLinkFactory, TCPLinkFactory, UDPLinkFactory, UP2PLinkFactory

public interface LinkFactory

The LinkFactory construct is associated with a given transport type and is responsible for the management/creation of links of that transport type. A linkFactory implementation is responsible for the creation of link to a given node and also to facilitate the handling of inbound links as a result of link creations initiated at another LinkFactory instance. LinkFactory also has methods which allow it to set performance status intervals for all its managed links. It also contains a method to manage migration of transports for a given link. Individual transport implementations would have different properties associated with theem for initializing the link factory, just as the createLink would have different properties to facilitate creation of links.


Method Summary
 boolean canManageLinkMigrationOfType(String linkType)
          Indicates if this factory can manage migration of links of a certain type
 Link createLink(Properties connectionProperties)
          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
 boolean loadLinkFactoryServices()
          Start communication services.
 void manageLinkMigration(Link link)
          Used to migrate communications of a link to the one supported by links managed by this factory
 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.
 

Method Detail

setLinkFactoryProperties

void setLinkFactoryProperties(Properties factoryProperties)

getManagedLinksType

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


createLink

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

Throws:
TransportException

setLinkStatusInterval

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


loadLinkFactoryServices

boolean loadLinkFactoryServices()
                                throws TransportException
Start communication services. In the case of TCP for example, the thread which incorporates the serverSocket.accept() is started

Throws:
TransportException

canManageLinkMigrationOfType

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


manageLinkMigration

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

Throws:
TransportException

setTransportHandler

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


dispose

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



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