CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation

com.tangosol.net
Class LoadBalancer.ResponseHandler

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.Daemon
          extended by com.tangosol.net.LoadBalancer.SocketHandler
              extended by com.tangosol.net.LoadBalancer.ResponseHandler
All Implemented Interfaces:
Runnable
Enclosing class:
LoadBalancer

public class LoadBalancer.ResponseHandler
extends LoadBalancer.SocketHandler

A ResponseHandler is a daemon thread that processes an outgoing response from a destination server.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.tangosol.util.Daemon
Daemon.DaemonWorker
 
Field Summary
protected  LoadBalancer.RequestHandler m_daemonRequest
          The RequestHandler that this ResponseHandler belongs to.
protected  Socket m_socketClient
          The Socket to write the response to.
protected  Socket m_socketServer
          The Socket to read the response from.
 
Fields inherited from class com.tangosol.net.LoadBalancer.SocketHandler
m_abBuf
 
Constructor Summary
LoadBalancer.ResponseHandler(LoadBalancer.RequestHandler daemonRequest)
          Construct a ResponseHandler that belongs to the specified RequestHandler.
 
Method Summary
 void relayResponse(Socket socketServer, Socket socketClient)
          This method is used to assign a task to the ResponseHandler thread from the RequestHandler thread.
 void run()
          Processing loop for the ResponseHandler daemon.
 
Methods inherited from class com.tangosol.net.LoadBalancer.SocketHandler
copy, ensureBuffer, process
 
Methods inherited from class com.tangosol.util.Daemon
changeState, configureWorker, getConfiguredName, getConfiguredPriority, getDescription, getState, getThread, getThreadContextClassLoader, getWorker, instantiateWorker, isOnWorkerThread, isRunning, isStopping, setConfiguredName, setConfiguredPriority, setThreadContextClassLoader, start, stop, toStateString, toString
 

Field Detail

m_daemonRequest

protected LoadBalancer.RequestHandler m_daemonRequest
The RequestHandler that this ResponseHandler belongs to.


m_socketServer

protected Socket m_socketServer
The Socket to read the response from.


m_socketClient

protected Socket m_socketClient
The Socket to write the response to.

Constructor Detail

LoadBalancer.ResponseHandler

public LoadBalancer.ResponseHandler(LoadBalancer.RequestHandler daemonRequest)
Construct a ResponseHandler that belongs to the specified RequestHandler.

Parameters:
daemonRequest - the RequestHandler that this ResponseHandler belongs to
Method Detail

run

public void run()
Processing loop for the ResponseHandler daemon.

Specified by:
run in interface Runnable
Specified by:
run in class LoadBalancer.SocketHandler

relayResponse

public void relayResponse(Socket socketServer,
                          Socket socketClient)
This method is used to assign a task to the ResponseHandler thread from the RequestHandler thread.

Parameters:
socketServer - the socket to copy from
socketClient - the socket to copy to

CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation