2011-11-04 22:56:09 +00:00
|
|
|
package net.i2p.client.streaming;
|
|
|
|
|
|
|
|
import net.i2p.I2PException;
|
|
|
|
import java.net.ConnectException;
|
|
|
|
import java.nio.channels.SelectableChannel;
|
|
|
|
|
2011-11-07 14:21:07 +00:00
|
|
|
/**
|
2012-06-13 19:08:49 +00:00
|
|
|
* 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.
|
|
|
|
*
|
2014-06-24 12:49:18 +00:00
|
|
|
* Unimplemented, unlikely to ever be implemented.
|
|
|
|
*
|
2011-11-07 14:21:07 +00:00
|
|
|
* @since 0.8.11
|
|
|
|
*/
|
2011-11-04 22:56:09 +00:00
|
|
|
public abstract class AcceptingChannel extends SelectableChannel {
|
2012-06-13 19:08:49 +00:00
|
|
|
|
2014-01-04 19:56:55 +00:00
|
|
|
protected abstract I2PSocket accept() throws I2PException, ConnectException;
|
2012-06-13 19:08:49 +00:00
|
|
|
|
|
|
|
protected final I2PSocketManager _socketManager;
|
|
|
|
|
2014-01-04 14:09:33 +00:00
|
|
|
protected AcceptingChannel(I2PSocketManager manager) {
|
2011-11-04 22:56:09 +00:00
|
|
|
this._socketManager = manager;
|
|
|
|
}
|
|
|
|
}
|