cgl.narada.transport
Interface Link

All Known Implementing Classes:
IPSecLink, LinkImpl, MulticastLink, MulticastRTPLink, NIOTCPLink, PoolTCPLink, PTCPLink, RTPLink, TCPLink, UDPLink

public interface Link

A Link is an abstraction that hides details pertaining to communications. Implementations of the link interface can incorporate their own handshaking protocols for setting up of the communication link. Links also contain methods which allow for checking the status of the underlying communication mechanism at specified intervals. Loss of communications should be reported to the transport handler interface.

Each implementation of the Link can expose and measure a set of performance factors. Measurement of performance factors over links requires cooperation from the other end-point of the communication link; this particular detail should be handled within the link implementation itself. How the link computes round trip delays, jitter factors, bandwidth, loss rates etc. should be within the domain of the link implementer. Links also have methods which enable/disable the measurement of these performance factors. Links also allow the specification of constraints (usually on the set of performance factors that it measures) and the link type that the communication must migrate to when those conditions are satisfied. Links expose the performance related information in the LinkPerformanceData construct.


Method Summary
 void closeLink()
          Garbage collect resources associated with this link.
 LinkPerformanceData[] getAllPerformanceData()
          Returns the complete set of performance factors measured and their corresponding values
 String getLinkId()
          Retrieves the String based id of the link
 String getLinkType()
          Returns the type of the communication link
 Object getNaradaBrokeringId()
          Returns the NaradaBrokeringId associated with this link
 String getPerformanceData(String factorName)
          Returns the value of a performance factor as a string
 String[] getPerformanceFactorsMeasured()
          Returns the list of performance factors that are measured on this communication link
 String getSecurityInformation()
          Information pertaining to the security strategy adopted for this communication link
 boolean isSecure()
          Indicates weather communication is encrypted on this link
 boolean performanceGatheringEnabled()
          Used to test weather performing gathering is enabled for a given communication link
 void sendData(byte[] data)
          The method used to send data over a communication link
 void sendData(byte[] data, String dataType)
          The method used to send data over a communication link, this method also includes information regarding the type (audio/video/xml-attachments etc.) of the data encapsulated within the data stream.
 void setKeepAliveTime(long keepAliveTime)
          Set the amount of time after which resources associated with this link need to be garbage collected.
 void setLinkId(String stringId)
          Sets the Id of the communication link
 void setLinkMigrationConstraint(String constraint, String linkType)
          Sets the conditions under which communication protocols need to be switched and the transport link that it should be switched to under the condition.
 void setLinkStatusInterval(long interval)
          Check the status of the communication link at intervals specified in the argument of this method
 void setNaradaBrokeringId(Object BrokeringId)
          The Naradabrokering Id of the node this link interacts with
 void setPerformanceGathering(boolean gather)
          Used to enable or disable performance gathering on a communication link
 

Method Detail

sendData

void sendData(byte[] data)
              throws TransportException
The method used to send data over a communication link

Throws:
TransportException

sendData

void sendData(byte[] data,
              String dataType)
              throws TransportException
The method used to send data over a communication link, this method also includes information regarding the type (audio/video/xml-attachments etc.) of the data encapsulated within the data stream. Using this information links can optimally flush/send data across the link

Throws:
TransportException

setLinkId

void setLinkId(String stringId)
Sets the Id of the communication link


getLinkId

String getLinkId()
Retrieves the String based id of the link


setNaradaBrokeringId

void setNaradaBrokeringId(Object BrokeringId)
The Naradabrokering Id of the node this link interacts with


getNaradaBrokeringId

Object getNaradaBrokeringId()
Returns the NaradaBrokeringId associated with this link


getLinkType

String getLinkType()
Returns the type of the communication link


setLinkMigrationConstraint

void setLinkMigrationConstraint(String constraint,
                                String linkType)
Sets the conditions under which communication protocols need to be switched and the transport link that it should be switched to under the condition. Multiple constraints can be set signifying migration to different protocols.


setLinkStatusInterval

void setLinkStatusInterval(long interval)
Check the status of the communication link at intervals specified in the argument of this method


setPerformanceGathering

void setPerformanceGathering(boolean gather)
Used to enable or disable performance gathering on a communication link


performanceGatheringEnabled

boolean performanceGatheringEnabled()
Used to test weather performing gathering is enabled for a given communication link


getPerformanceFactorsMeasured

String[] getPerformanceFactorsMeasured()
Returns the list of performance factors that are measured on this communication link


getAllPerformanceData

LinkPerformanceData[] getAllPerformanceData()
Returns the complete set of performance factors measured and their corresponding values


getPerformanceData

String getPerformanceData(String factorName)
Returns the value of a performance factor as a string


setKeepAliveTime

void setKeepAliveTime(long keepAliveTime)
Set the amount of time after which resources associated with this link need to be garbage collected. A value of '0' indicates that this link needs to be active at all times.


closeLink

void closeLink()
Garbage collect resources associated with this link. Sockets need to be closed and any resources associated with communication, needs to be garbage collected


isSecure

boolean isSecure()
Indicates weather communication is encrypted on this link


getSecurityInformation

String getSecurityInformation()
Information pertaining to the security strategy adopted for this communication link



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