Package com.tangosol.net
Class LoadBalancer.ResponseHandler
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.Daemon
com.tangosol.net.LoadBalancer.SocketHandler
com.tangosol.net.LoadBalancer.ResponseHandler
- Enclosing class:
LoadBalancer
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.DaemonWorkerNested classes/interfaces inherited from class com.tangosol.util.Base
Base.LoggingWriter -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LoadBalancer.RequestHandlerThe RequestHandler that this ResponseHandler belongs to.protected SocketThe Socket to write the response to.protected SocketThe Socket to read the response from.Fields inherited from class com.tangosol.net.LoadBalancer.SocketHandler
m_abBuf -
Constructor Summary
ConstructorsConstructorDescriptionResponseHandler(LoadBalancer.RequestHandler daemonRequest) Construct a ResponseHandler that belongs to the specified RequestHandler. -
Method Summary
Modifier and TypeMethodDescriptionvoidrelayResponse(Socket socketServer, Socket socketClient) This method is used to assign a task to the ResponseHandler thread from the RequestHandler thread.voidrun()Processing loop for the ResponseHandler daemon.Methods inherited from class com.tangosol.net.LoadBalancer.SocketHandler
copy, ensureBuffer, processMethods inherited from class com.tangosol.util.Daemon
changeState, configureWorker, ensureThreadGroup, 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, toStringMethods inherited from class com.tangosol.util.Base
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mergeArray, mergeBooleanArray, mergeByteArray, mergeCharArray, mergeDoubleArray, mergeFloatArray, mergeIntArray, mergeLongArray, mod, mod, newHashMap, newHashMap, newHashSet, newHashSet, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
-
Field Details
-
m_daemonRequest
The RequestHandler that this ResponseHandler belongs to. -
m_socketServer
The Socket to read the response from. -
m_socketClient
The Socket to write the response to.
-
-
Constructor Details
-
ResponseHandler
Construct a ResponseHandler that belongs to the specified RequestHandler.- Parameters:
daemonRequest- the RequestHandler that this ResponseHandler belongs to
-
-
Method Details
-
run
public void run()Processing loop for the ResponseHandler daemon.- Specified by:
runin interfaceRunnable- Specified by:
runin classLoadBalancer.SocketHandler
-
relayResponse
This method is used to assign a task to the ResponseHandler thread from the RequestHandler thread.- Parameters:
socketServer- the socket to copy fromsocketClient- the socket to copy to
-