public class DefaultSocketChannelWrapper extends Object implements SocketChannelWrapper
Modifier and Type | Field and Description |
---|---|
protected SocketChannel |
socketChannel |
Constructor and Description |
---|
DefaultSocketChannelWrapper(SocketChannel socketChannel) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
SelectableChannel |
configureBlocking(boolean b) |
boolean |
connect(SocketAddress socketAddress) |
boolean |
finishConnect() |
boolean |
isBlocking() |
boolean |
isConnected() |
boolean |
isConnectionPending() |
boolean |
isOpen() |
SelectionKey |
keyFor(Selector selector) |
int |
read(ByteBuffer byteBuffer) |
SelectionKey |
register(Selector selector,
int ops,
Object attachment) |
Socket |
socket() |
String |
toString() |
int |
validOps() |
int |
write(ByteBuffer byteBuffer) |
protected final SocketChannel socketChannel
public DefaultSocketChannelWrapper(SocketChannel socketChannel)
public boolean isBlocking()
isBlocking
in interface SocketChannelWrapper
public int validOps()
validOps
in interface SocketChannelWrapper
public Socket socket()
socket
in interface SocketChannelWrapper
public boolean isConnected()
isConnected
in interface SocketChannelWrapper
public boolean isConnectionPending()
isConnectionPending
in interface SocketChannelWrapper
public boolean connect(SocketAddress socketAddress) throws IOException
connect
in interface SocketChannelWrapper
IOException
public boolean finishConnect() throws IOException
finishConnect
in interface SocketChannelWrapper
IOException
public int read(ByteBuffer byteBuffer) throws IOException
read
in interface SocketChannelWrapper
IOException
public int write(ByteBuffer byteBuffer) throws IOException
write
in interface SocketChannelWrapper
IOException
public SelectableChannel configureBlocking(boolean b) throws IOException
configureBlocking
in interface SocketChannelWrapper
IOException
public boolean isOpen()
isOpen
in interface SocketChannelWrapper
public void close() throws IOException
close
in interface SocketChannelWrapper
close
in interface Closeable
close
in interface AutoCloseable
IOException
public SelectionKey keyFor(Selector selector)
keyFor
in interface SocketChannelWrapper
public SelectionKey register(Selector selector, int ops, Object attachment) throws ClosedChannelException
register
in interface SocketChannelWrapper
ClosedChannelException
Copyright © 2014 Hazelcast, Inc.. All rights reserved.