cgl.narada.transport.threadpool
Class SendTask

java.lang.Object
  extended by cgl.narada.transport.threadpool.NetworkTask
      extended by cgl.narada.transport.threadpool.SendTask
All Implemented Interfaces:
TransportDebugFlags, Runnable

public class SendTask
extends NetworkTask
implements TransportDebugFlags

Responsible for sending tcp packets across the socket connection that is established during initializations. This class notifies any loss of connections to the PoolTCPLink which in turn proceeds to notify the PoolTCPLinkFactory.


Field Summary
 
Fields inherited from class cgl.narada.transport.threadpool.NetworkTask
RECEIVE_TASK, SEND_TASK
 
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
SendTask(SocketChannel sc, PoolTCPLink pooltcpLink, PoolTCPLinkFactory pooltcpLinkFactory)
           
 
Method Summary
 String getIdentifier()
          Retrieve the identifier associated with the network task
 void releaseResources()
           
 void run()
           
 void sendData(byte[] dataToSend)
           
 void sendData(byte[] dataToSend, String dataType)
           
 
Methods inherited from class cgl.narada.transport.threadpool.NetworkTask
getTaskType, setTaskType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SendTask

public SendTask(SocketChannel sc,
                PoolTCPLink pooltcpLink,
                PoolTCPLinkFactory pooltcpLinkFactory)
         throws Exception
Throws:
Exception
Method Detail

releaseResources

public void releaseResources()

sendData

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

sendData

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

run

public void run()
Specified by:
run in interface Runnable

getIdentifier

public String getIdentifier()
Description copied from class: NetworkTask
Retrieve the identifier associated with the network task

Specified by:
getIdentifier in class NetworkTask
Returns:
The identifier associated with the network task.


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