|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.util.Daemon
com.tangosol.net.LoadBalancer.SocketHandler
public abstract static class LoadBalancer.SocketHandler
A SocketHandler is an abstract daemon thread.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.tangosol.util.Daemon |
---|
Daemon.DaemonWorker |
Field Summary | |
---|---|
protected byte[] |
m_abBuf
The buffer to use for reading from a stream. |
Constructor Summary | |
---|---|
LoadBalancer.SocketHandler(String sName)
Construct a SocketHandler with a given daemon thread name. |
Method Summary | |
---|---|
protected void |
copy(InputStream streamIn,
OutputStream streamOut,
byte[] abBuf)
Process the transfer of data from one stream to another. |
protected byte[] |
ensureBuffer(Socket socket)
Return the existing buffer, if there is one, or create one to use for reading from the passed socket. |
protected void |
process(Socket socketIn,
Socket socketOut)
Process the transfer of data from one socket to another. |
abstract void |
run()
Processing loop for the SocketHandler. |
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 |
---|
protected byte[] m_abBuf
Constructor Detail |
---|
public LoadBalancer.SocketHandler(String sName)
Method Detail |
---|
public abstract void run()
run
in interface Runnable
run
in class Daemon
protected void process(Socket socketIn, Socket socketOut) throws IOException
socketIn
- the socket to read fromsocketOut
- the socket to write to
IOException
protected void copy(InputStream streamIn, OutputStream streamOut, byte[] abBuf) throws IOException
streamIn
- the stream to read fromstreamOut
- the stream to write toabBuf
- the byte array to use as a buffer to read into
and write from
IOException
protected byte[] ensureBuffer(Socket socket)
socket
- the socket that the buffer will be used to read from
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |