com.hazelcast.nio.tcp
Interface SocketChannelWrapper

All Superinterfaces:
Closeable
All Known Implementing Classes:
DefaultSocketChannelWrapper

public interface SocketChannelWrapper
extends Closeable


Method Summary
 void close()
          Closes socket channel.
 void closeInbound()
          Closes inbound.
 void closeOutbound()
          Closes outbound.
 SelectableChannel configureBlocking(boolean b)
           
 boolean connect(SocketAddress socketAddress)
           
 boolean isBlocking()
           
 boolean isConnected()
           
 boolean isOpen()
           
 SelectionKey keyFor(Selector selector)
           
 int read(ByteBuffer byteBuffer)
           
 SelectionKey register(Selector selector, int ops, Object attachment)
           
 Socket socket()
           
 int write(ByteBuffer byteBuffer)
           
 

Method Detail

isBlocking

boolean isBlocking()

socket

Socket socket()

isConnected

boolean isConnected()

connect

boolean connect(SocketAddress socketAddress)
                throws IOException
Throws:
IOException

keyFor

SelectionKey keyFor(Selector selector)

register

SelectionKey register(Selector selector,
                      int ops,
                      Object attachment)
                      throws ClosedChannelException
Throws:
ClosedChannelException

read

int read(ByteBuffer byteBuffer)
         throws IOException
Throws:
IOException

write

int write(ByteBuffer byteBuffer)
          throws IOException
Throws:
IOException

configureBlocking

SelectableChannel configureBlocking(boolean b)
                                    throws IOException
Throws:
IOException

isOpen

boolean isOpen()

closeInbound

void closeInbound()
                  throws IOException
Closes inbound.

Not thread safe. Should be called in channel reader thread.

Throws:
IOException

closeOutbound

void closeOutbound()
                   throws IOException
Closes outbound.

Not thread safe. Should be called in channel writer thread.

Throws:
IOException

close

void close()
           throws IOException
Closes socket channel.

Specified by:
close in interface Closeable
Throws:
IOException


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.