Oracle® Coherence Java API Reference
v3.5

E14977-01

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:
Guardable, java.lang.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  java.net.Socket m_socketClient
          The Socket to write the response to.
protected  java.net.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(java.net.Socket socketServer, java.net.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, finishStarting, getConfiguredName, getConfiguredPriority, getDescription, getGuardContext, getGuardRegisterAction, getMaxWaitMillis, getState, getThread, getThreadContextClassLoader, getWorker, guardIfNeeded, heartbeat, heartbeat, instantiateWorker, isGuarded, isOnWorkerThread, isRunning, isStopping, recover, setConfiguredName, setConfiguredPriority, setContext, setGuardPolicy, setGuardRegisterAction, setThreadContextClassLoader, start, stop, terminate, toStateString, toString
 

Field Detail

m_daemonRequest

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


m_socketServer

protected java.net.Socket m_socketServer
The Socket to read the response from.


m_socketClient

protected java.net.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 java.lang.Runnable
Specified by:
run in class LoadBalancer.SocketHandler

relayResponse

public void relayResponse(java.net.Socket socketServer,
                          java.net.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

Oracle® Coherence Java API Reference
v3.5

E14977-01

Copyright © 2000, 2009, Oracle. All rights reserved.