public abstract class SchoonerSockIO extends SockIOPool.SockIO
SchoonerSockIO,
SockIOPool.SockIO| Modifier and Type | Field and Description |
|---|---|
ByteBuffer |
readBuf |
protected org.apache.commons.pool.impl.GenericObjectPool |
sockets |
ByteBuffer |
writeBuf |
| Constructor and Description |
|---|
SchoonerSockIO(org.apache.commons.pool.impl.GenericObjectPool sockets,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBufferSize() |
abstract ByteChannel |
getByteChannel()
get byte channel from this socket.
|
abstract byte[] |
getResponse(short rid) |
boolean |
isAlive()
check if the connection is working
this version fix the bugs of isAlive() as follows:
1.
|
abstract short |
preWrite() |
void |
setBufferSize(int bufferSize) |
protected org.apache.commons.pool.impl.GenericObjectPool sockets
public ByteBuffer readBuf
public ByteBuffer writeBuf
public SchoonerSockIO(org.apache.commons.pool.impl.GenericObjectPool sockets,
int bufferSize)
throws UnknownHostException,
IOException
UnknownHostExceptionIOExceptionpublic abstract short preWrite()
public abstract byte[] getResponse(short rid)
throws IOException
IOExceptionpublic abstract ByteChannel getByteChannel()
public void setBufferSize(int bufferSize)
public int getBufferSize()
public boolean isAlive()
isAlive in class SockIOPool.SockIOCopyright © 2013 Schooner Information Technology. All Rights Reserved.