Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-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, 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, finishStarting, finishStopping, getConfiguredName, getConfiguredPriority, getContext, getDescription, getGuardRegisterAction, getMaxWaitMillis, getState, getThread, getThreadContextClassLoader, getWorker, guardIfNeeded, heartbeat, heartbeat, instantiateWorker, isGuarded, isOnWorkerThread, isRunning, isStopping, recover, setConfiguredName, setConfiguredPriority, setContext, setGuardPolicy, setGuardRegisterAction, setThreadContextClassLoader, shutdown, start, stop, terminate, 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
See Also:
Thread.run()

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

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.