cgl.narada.transport.sslHttpBase
Class LinkImpl

java.lang.Object
  extended by cgl.narada.transport.MonitoredLink
      extended by cgl.narada.transport.sslHttpBase.LinkImpl
All Implemented Interfaces:
PerformanceMeasurementListener, Link

public class LinkImpl
extends MonitoredLink
implements Link, PerformanceMeasurementListener

The Link implementation which serves as a base for SSL communications.


Field Summary
protected  String m_linkID
           
 
Constructor Summary
protected LinkImpl(Transport transport, String linkType, LinkManager parent)
          -------------------------------------------------------------------
 
Method Summary
 void closeLink()
          -------------------------------------------------------------------
 Object getBrokerID()
          -------------------------------------------------------------------
 Properties getCreationProperties()
          ------------------------------------------------------------------- Gets the original properties that were passed into LinkFactory.createLink() for this link.
 long getKeepAliveEndTime()
          -------------------------------------------------------------------
 String getLinkId()
          -------------------------------------------------------------------
 String getLinkType()
          -------------------------------------------------------------------
 String getName()
          --------------------------------------------------------------------
 Object getNaradaBrokeringId()
          -------------------------------------------------------------------
 String getSecurityInformation()
          -------------------------------------------------------------------
 long getStatusInterval()
          --------------------------------------------------------------------
 Transport getTransport()
          -------------------------------------------------------------------
 void handlePerformanceMessage(LinkMessage message)
          -------------------------------------------------------------------
 boolean isSecure()
          -------------------------------------------------------------------
 void performanceMessagesAvailable(Vector data)
          --------------------------------------------------------------------
 void sendData(byte[] data)
          -------------------------------------------------------------------
 void sendData(byte[] data, String dataType)
          ------------------------------------------------------------------- Currently the same as sendData().
 void setCreationProperties(Properties cp)
          ------------------------------------------------------------------- Sets the original properties that were passed into LinkFactory.createLink() for this link.
 void setKeepAliveTime(long keepAliveTime)
          ------------------------------------------------------------------- Set a keep alive value for this link.
 void setLinkId(String stringId)
          ------------------------------------------------------------------- Update the link id for this broker and the destination broker.
 void setLinkMigrationConstraint(String constraint, String linkType)
          -------------------------------------------------------------------
 void setLinkStatusInterval(long interval)
          -------------------------------------------------------------------
 void setNaradaBrokeringId(Object brokeringId)
          -------------------------------------------------------------------
protected  void updateLinkID(String id)
          ------------------------------------------------------------------- This does not cause the link id change to be propagated to remote brokers.
 
Methods inherited from class cgl.narada.transport.MonitoredLink
disablePerformanceFactor, enablePerformanceFactor, getAllPerformanceData, getLatencies, getPerformanceData, getPerformanceFactorsMeasured, performanceGatheringEnabled, processPerformancePackets, sendPerformancePackets, setPerformanceGathering
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cgl.narada.transport.Link
getAllPerformanceData, getPerformanceData, getPerformanceFactorsMeasured, performanceGatheringEnabled, setPerformanceGathering
 

Field Detail

m_linkID

protected String m_linkID
Constructor Detail

LinkImpl

protected LinkImpl(Transport transport,
                   String linkType,
                   LinkManager parent)
-------------------------------------------------------------------

Method Detail

sendData

public void sendData(byte[] data)
              throws TransportException
-------------------------------------------------------------------

Specified by:
sendData in interface Link
Throws:
TransportException

sendData

public void sendData(byte[] data,
                     String dataType)
              throws TransportException
------------------------------------------------------------------- Currently the same as sendData().

Specified by:
sendData in interface Link
Throws:
TransportException

setLinkId

public void setLinkId(String stringId)
------------------------------------------------------------------- Update the link id for this broker and the destination broker.

Specified by:
setLinkId in interface Link

getNaradaBrokeringId

public Object getNaradaBrokeringId()
-------------------------------------------------------------------

Specified by:
getNaradaBrokeringId in interface Link

setNaradaBrokeringId

public void setNaradaBrokeringId(Object brokeringId)
-------------------------------------------------------------------

Specified by:
setNaradaBrokeringId in interface Link

getLinkType

public String getLinkType()
-------------------------------------------------------------------

Specified by:
getLinkType in interface Link

setKeepAliveTime

public void setKeepAliveTime(long keepAliveTime)
------------------------------------------------------------------- Set a keep alive value for this link. Links are killed off by the link manager when keep alive has expired.

Specified by:
setKeepAliveTime in interface Link

getKeepAliveEndTime

public long getKeepAliveEndTime()
-------------------------------------------------------------------


getLinkId

public String getLinkId()
-------------------------------------------------------------------

Specified by:
getLinkId in interface Link

closeLink

public void closeLink()
-------------------------------------------------------------------

Specified by:
closeLink in interface Link

isSecure

public boolean isSecure()
-------------------------------------------------------------------

Specified by:
isSecure in interface Link

getSecurityInformation

public String getSecurityInformation()
-------------------------------------------------------------------

Specified by:
getSecurityInformation in interface Link
Returns:
The type of secure transport. [ SSL, ... ]

setLinkMigrationConstraint

public void setLinkMigrationConstraint(String constraint,
                                       String linkType)
-------------------------------------------------------------------

Specified by:
setLinkMigrationConstraint in interface Link

setLinkStatusInterval

public void setLinkStatusInterval(long interval)
-------------------------------------------------------------------

Specified by:
setLinkStatusInterval in interface Link

getBrokerID

public Object getBrokerID()
-------------------------------------------------------------------


getTransport

public Transport getTransport()
-------------------------------------------------------------------


setCreationProperties

public void setCreationProperties(Properties cp)
------------------------------------------------------------------- Sets the original properties that were passed into LinkFactory.createLink() for this link. Used primarily for link migration purposes.


getCreationProperties

public Properties getCreationProperties()
------------------------------------------------------------------- Gets the original properties that were passed into LinkFactory.createLink() for this link. Used primarily for link migration purposes.


handlePerformanceMessage

public void handlePerformanceMessage(LinkMessage message)
-------------------------------------------------------------------


performanceMessagesAvailable

public void performanceMessagesAvailable(Vector data)
--------------------------------------------------------------------

Specified by:
performanceMessagesAvailable in interface PerformanceMeasurementListener
Parameters:
data - A vector of ByteArrayOutputStreams containing performance measurement messages that should be sent. These messages should be sent immediately and in sequence to avoid errors in measurement. Each message should be sent out in 10 ms intervals to avoid buffering to some extent.

getStatusInterval

public long getStatusInterval()
--------------------------------------------------------------------

Specified by:
getStatusInterval in interface PerformanceMeasurementListener

getName

public String getName()
--------------------------------------------------------------------

Specified by:
getName in interface PerformanceMeasurementListener

updateLinkID

protected void updateLinkID(String id)
------------------------------------------------------------------- This does not cause the link id change to be propagated to remote brokers. Only changes locally.



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