com.aelitis.azureus.core.proxy.impl
Class AEProxyImpl
java.lang.Object
com.aelitis.azureus.core.proxy.impl.AEProxyImpl
- All Implemented Interfaces:
- VirtualChannelSelector.VirtualAbstractSelectorListener, VirtualChannelSelector.VirtualSelectorListener, AEProxy
public class AEProxyImpl
- extends Object
- implements AEProxy, VirtualChannelSelector.VirtualSelectorListener
- Author:
- parg
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AEProxyImpl
public AEProxyImpl(int _port,
long _connect_timeout,
long _read_timeout,
AEProxyHandler _proxy_handler)
throws AEProxyException
- Throws:
AEProxyException
setAllowExternalConnections
public void setAllowExternalConnections(boolean permit)
- Specified by:
setAllowExternalConnections
in interface AEProxy
acceptLoop
protected void acceptLoop(ServerSocketChannel ssc)
close
protected void close(AEProxyConnectionImpl processor)
selectLoop
protected void selectLoop(VirtualChannelSelector selector)
checkTimeouts
protected void checkTimeouts()
requestWriteSelect
protected void requestWriteSelect(AEProxyConnectionImpl processor,
SocketChannel sc)
cancelWriteSelect
protected void cancelWriteSelect(SocketChannel sc)
requestReadSelect
protected void requestReadSelect(AEProxyConnectionImpl processor,
SocketChannel sc)
cancelReadSelect
protected void cancelReadSelect(SocketChannel sc)
requestConnectSelect
protected void requestConnectSelect(AEProxyConnectionImpl processor,
SocketChannel sc)
cancelConnectSelect
protected void cancelConnectSelect(SocketChannel sc)
selectSuccess
public boolean selectSuccess(VirtualChannelSelector selector,
SocketChannel sc,
Object attachment)
- Description copied from interface:
VirtualChannelSelector.VirtualSelectorListener
- Called when a channel is successfully selected for readyness.
- Specified by:
selectSuccess
in interface VirtualChannelSelector.VirtualSelectorListener
attachment
- originally given with the channel's registration
- Returns:
- indicator of whether or not any 'progress' was made due to this select
null -> progress made, String -> location of non progress
e.g. read-select -> read >0 bytes, write-select -> wrote > 0 bytes
selectFailure
public void selectFailure(VirtualChannelSelector selector,
SocketChannel sc,
Object attachment,
Throwable msg)
- Description copied from interface:
VirtualChannelSelector.VirtualSelectorListener
- Called when a channel selection fails.
- Specified by:
selectFailure
in interface VirtualChannelSelector.VirtualSelectorListener
msg
- failure message
getPort
public int getPort()
- Specified by:
getPort
in interface AEProxy
destroy
public void destroy()
- Specified by:
destroy
in interface AEProxy