Skip navigation links

Overview | Package | Class | Tree | Index | Help
| 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

## com.tangosol.net
Class WrapperSocketChannel

`java.lang.Object
java.nio.channels.spi.AbstractInterruptibleChannel
java.nio.channels.SelectableChannel
java.nio.channels.spi.AbstractSelectableChannel
java.nio.channels.SocketChannel
com.tangosol.net.WrapperSocketChannel`

All Implemented Interfaces:
  WrapperSelector.WrapperSelectableChannel, Closeable, ByteChannel, Channel, GatheringByteChannel, InterruptibleChannel, ReadableByteChannel, ScatteringByteChannel, WritableByteChannel

      public class WrapperSocketChannel

extends SocketChannel
implements WrapperSelector.WrapperSelectableChannel

Wrapper SocketChannel implementation that delegates all operations to a delegate SocketChannel.

Author:
  mf 2010.05.19

Field Summary
`protected SocketChannel` | `m_delegate` The delegate SocketChannel.
`protected Socket` | `m_socket` The associated WrapperSocket.

Constructor Summary
`WrapperSocketChannel(SocketChannel channel, SelectorProvider provider)`

Method Summary
`boolean` | `connect(SocketAddress remote)`
`boolean` | `finishConnect()`
`protected void` | `implCloseSelectableChannel()`
`protected void` | `implConfigureBlocking(boolean block)`
`boolean` | `isConnected()`
`boolean` | `isConnectionPending()`
`static SocketChannel` | `open()` Unsupported.
`int` | `read(ByteBuffer dst)`
`long` | `read(ByteBuffer[] dsts, int offset, int length)`
`WrapperSelector.WrapperSelectionKey` | `registerInternal(WrapperSelector selector, int ops, Object att)` Register with the specified selector.
`Socket` | `socket()`
`protected Socket` | `wrapSocket(Socket socket)` Produce a wrapper around the specified socket.
`int` | `write(ByteBuffer src)`
`long` | `write(ByteBuffer[] srcs, int offset, int length)`

Methods inherited from class java.nio.channels.SocketChannel
`open, read, validOps, write`

Methods inherited from class java.nio.channels.spi.AbstractSelectableChannel
`blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, register`

Methods inherited from class java.nio.channels.SelectableChannel
`register`

Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
`begin, close, end, isOpen`

Methods inherited from interface java.nio.channels.Channel
`close, isOpen`

Methods inherited from interface java.nio.channels.Channel
`close, isOpen`

Methods inherited from interface java.nio.channels.Channel
`close, isOpen`

Methods inherited from interface java.nio.channels.Channel
`close, isOpen`

Field Detail

### m_delegate

    protected SocketChannel m_delegate

  The delegate SocketChannel.

### m_socket

    protected Socket m_socket

  The associated WrapperSocket.

Constructor Detail

### WrapperSocketChannel

    public WrapperSocketChannel(SocketChannel channel,
                                SelectorProvider provider)

Method Detail

### wrapSocket

    protected Socket wrapSocket(Socket socket)

  Produce a wrapper around the specified socket.
  Parameters:
    `socket` - the socket to wrap
  Returns:
    the wrapper socket

### open

    public static SocketChannel open()

  Unsupported.
  Returns:
    never
  Throws:
    `UnsupportedOperationException`

### socket

    public Socket socket()

  Specified by:
    `socket` in class `SocketChannel`

### isConnected

    public boolean isConnected()

  Specified by:
    `isConnected` in class `SocketChannel`

### isConnectionPending

    public boolean isConnectionPending()

  Specified by:
    `isConnectionPending` in class `SocketChannel`

### connect

    public boolean connect(SocketAddress remote)
                    throws IOException

  Specified by:
    `connect` in class `SocketChannel`
  Throws:
    `IOException`

### finishConnect

    public boolean finishConnect()
                          throws IOException

  Specified by:
    `finishConnect` in class `SocketChannel`
  Throws:
    `IOException`

### read

    public int read(ByteBuffer dst)
             throws IOException

  Specified by:
    `read` in interface `ReadableByteChannel`
  Specified by:
    `read` in class `SocketChannel`
  Throws:
    `IOException`

### read

    public long read(ByteBuffer[] dsts,
                     int offset,
                     int length)
              throws IOException

  Specified by:
    `read` in interface `ScatteringByteChannel`
  Specified by:
    `read` in class `SocketChannel`
  Throws:
    `IOException`

### write

    public int write(ByteBuffer src)
              throws IOException

  Specified by:
    `write` in interface `WritableByteChannel`
  Specified by:
    `write` in class `SocketChannel`
  Throws:
    `IOException`

### write

    public long write(ByteBuffer[] srcs,
                      int offset,
                      int length)
               throws IOException

  Specified by:
    `write` in interface `GatheringByteChannel`
  Specified by:
    `write` in class `SocketChannel`
  Throws:
    `IOException`

### implCloseSelectableChannel

    protected void implCloseSelectableChannel()
                                       throws IOException

  Specified by:
    `implCloseSelectableChannel` in class `AbstractSelectableChannel`
  Throws:
    `IOException`

### implConfigureBlocking

    protected void implConfigureBlocking(boolean block)
                                  throws IOException

  Specified by:
    `implConfigureBlocking` in class `AbstractSelectableChannel`
  Throws:
    `IOException`

### registerInternal

    public WrapperSelector.WrapperSelectionKey registerInternal(WrapperSelector selector,
                                                                int ops,
                                                                Object att)
                                                         throws IOException

  Register with the specified selector.
  Specified by:
    `registerInternal` in interface `WrapperSelector.WrapperSelectableChannel`
  Parameters:
    `selector` - the selector to register with
    `ops` - the operations of interest
    `att` - the attachment
  Returns:
    the wrapper selection key
  Throws:
    `IOException` - if an I/O error occurs

Skip navigation links

Overview | Package | Class | Tree | Index | Help
| 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

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.