|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-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(java.lang.String sName) Construct a SocketHandler with a given daemon thread name. |
Method Summary | |
---|---|
protected void |
copy(java.io.InputStream streamIn, java.io.OutputStream streamOut, byte[] abBuf) Process the transfer of data from one stream to another. |
protected byte[] |
ensureBuffer(java.net.Socket socket) Return the existing buffer, if there is one, or create one to use for reading from the passed socket. |
protected void |
process(java.net.Socket socketIn, java.net.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(java.lang.String sName)
Method Detail |
---|
public abstract void run()
run
in interface java.lang.Runnable
run
in class Daemon
Thread.run()
protected void process(java.net.Socket socketIn, java.net.Socket socketOut) throws java.io.IOException
socketIn
- the socket to read fromsocketOut
- the socket to write tojava.io.IOException
protected void copy(java.io.InputStream streamIn, java.io.OutputStream streamOut, byte[] abBuf) throws java.io.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 fromjava.io.IOException
protected byte[] ensureBuffer(java.net.Socket socket)
socket
- the socket that the buffer will be used to read from
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |