cgl.narada.transport.threadpool
Class ReceiveTask

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

public class ReceiveTask
extends NetworkTask
implements TransportDebugFlags

Listens for TCP packets arriving at a socket and performs various operations based on situations arising during communication. These received packets are then encapsulated into a specialized data structure and forwarded to the transport handler implementation residing in the transport layer.


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
ReceiveTask(SocketChannel sc, PoolTCPLink pooltcpLink)
           
 
Method Summary
 String getIdentifier()
          Retrieve the identifier associated with the network task
 void initialize(SelectionKey key)
           
 void readDataFromSocket()
           
 void releaseResources()
           
 void run()
           
 
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

ReceiveTask

public ReceiveTask(SocketChannel sc,
                   PoolTCPLink pooltcpLink)
            throws Exception
Throws:
Exception
Method Detail

releaseResources

public void releaseResources()

initialize

public void initialize(SelectionKey key)

run

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

readDataFromSocket

public void readDataFromSocket()
                        throws Exception
Throws:
Exception

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