net.i2p.client.streaming
Class AcceptingChannelImpl

java.lang.Object
  extended by java.nio.channels.spi.AbstractInterruptibleChannel
      extended by java.nio.channels.SelectableChannel
          extended by net.i2p.client.streaming.AcceptingChannel
              extended by net.i2p.client.streaming.AcceptingChannelImpl
All Implemented Interfaces:
Closeable, Channel, InterruptibleChannel

 class AcceptingChannelImpl
extends AcceptingChannel

As this does not (yet) extend ServerSocketChannel it cannot be returned by StandardServerSocket.getChannel(), until we implement an I2P SocketAddress class. Warning, this interface and implementation is preliminary and subject to change without notice.

Since:
0.8.11

Field Summary
 
Fields inherited from class net.i2p.client.streaming.AcceptingChannel
_socketManager
 
Constructor Summary
AcceptingChannelImpl(I2PSocketManager manager)
           
 
Method Summary
(package private)  I2PSocket accept()
           
 Object blockingLock()
           
 SelectableChannel configureBlocking(boolean blocking)
           
protected  void implCloseChannel()
           
 boolean isBlocking()
           
 boolean isRegistered()
           
 SelectionKey keyFor(Selector arg0)
           
 SelectorProvider provider()
           
 SelectionKey register(Selector sel, int ops, Object lock)
           
 int validOps()
           
 
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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 

Constructor Detail

AcceptingChannelImpl

AcceptingChannelImpl(I2PSocketManager manager)
Method Detail

accept

I2PSocket accept()
           throws I2PException,
                  ConnectException
Specified by:
accept in class AcceptingChannel
Throws:
I2PException
ConnectException

provider

public SelectorProvider provider()
Specified by:
provider in class SelectableChannel

validOps

public int validOps()
Specified by:
validOps in class SelectableChannel

isRegistered

public boolean isRegistered()
Specified by:
isRegistered in class SelectableChannel

keyFor

public SelectionKey keyFor(Selector arg0)
Specified by:
keyFor in class SelectableChannel

register

public SelectionKey register(Selector sel,
                             int ops,
                             Object lock)
                      throws ClosedChannelException
Specified by:
register in class SelectableChannel
Throws:
ClosedChannelException

configureBlocking

public SelectableChannel configureBlocking(boolean blocking)
                                    throws IOException
Specified by:
configureBlocking in class SelectableChannel
Throws:
IOException

isBlocking

public boolean isBlocking()
Specified by:
isBlocking in class SelectableChannel

blockingLock

public Object blockingLock()
Specified by:
blockingLock in class SelectableChannel

implCloseChannel

protected void implCloseChannel()
                         throws IOException
Specified by:
implCloseChannel in class AbstractInterruptibleChannel
Throws:
IOException