cgl.narada.transport.tcp
Class TCPSenderThread

java.lang.Object
  extended by cgl.narada.transport.tcp.TCPSenderThread
All Implemented Interfaces:
TransmissionReporter, TransportDebugFlags

public class TCPSenderThread
extends Object
implements TransportDebugFlags, TransmissionReporter

Responsible for sending tcp packets across the socket connection that is established during initializations. The TCPSenderThread notifies any loss of connections to the TCPLink which in turn proceeds to noitify the TCPLinkFactory.


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
TCPSenderThread(Socket socket, TCPLink tcpLink)
           
 
Method Summary
 long getSizeOfOngoingTransfer()
          Retrieves the size of the ongoing/pending transfer.
 boolean hasPendingTransfer()
          Indicates if there is a pending/on-going transmission over this link.
 void performAtomicTransfer(byte[] dataToSend)
           
 void releaseResources()
           
 void run()
           
 void sendData(byte[] dataToSend)
           
 void sendData(byte[] dataToSend, String dataType)
           
 void sendPing()
           
 void sendPingResponse(long timeSent)
           
 void setLinkId(String linkId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCPSenderThread

public TCPSenderThread(Socket socket,
                       TCPLink tcpLink)
Method Detail

setLinkId

public void setLinkId(String linkId)

releaseResources

public void releaseResources()

sendData

public void sendData(byte[] dataToSend)
              throws TransportException
Throws:
TransportException

performAtomicTransfer

public void performAtomicTransfer(byte[] dataToSend)
                           throws TransportException
Throws:
TransportException

sendData

public void sendData(byte[] dataToSend,
                     String dataType)
              throws TransportException
Throws:
TransportException

sendPing

public void sendPing()

sendPingResponse

public void sendPingResponse(long timeSent)

run

public void run()

hasPendingTransfer

public boolean hasPendingTransfer()
Description copied from interface: TransmissionReporter
Indicates if there is a pending/on-going transmission over this link.

Specified by:
hasPendingTransfer in interface TransmissionReporter

getSizeOfOngoingTransfer

public long getSizeOfOngoingTransfer()
Description copied from interface: TransmissionReporter
Retrieves the size of the ongoing/pending transfer.

Specified by:
getSizeOfOngoingTransfer in interface TransmissionReporter


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