|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.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. |
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
Thread.run()
protected void process(Socket socketIn, Socket socketOut) throws IOException
socketIn
- the socket to read fromsocketOut
- the socket to write toIOException
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 fromIOException
protected byte[] ensureBuffer(Socket socket)
socket
- the socket that the buffer will be used to read from
|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |