Class AEProxyImpl
java.lang.Object
com.biglybt.core.proxy.impl.AEProxyImpl
- All Implemented Interfaces:
VirtualChannelSelector.VirtualAbstractSelectorListener, VirtualChannelSelector.VirtualSelectorListener, AEProxy
public class AEProxyImpl
extends Object
implements AEProxy, VirtualChannelSelector.VirtualSelectorListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean(package private) final VirtualChannelSelectorprivate final longprivate static final intprivate booleanprivate longprivate static final LogIDsprivate intprivate final List<AEProxyConnectionImpl> private final AEProxyHandler(package private) final VirtualChannelSelectorprivate final longprivate ServerSocketChannelprivate final AEMonitorprivate final HashMap(package private) final VirtualChannelSelector -
Constructor Summary
ConstructorsConstructorDescriptionAEProxyImpl(int _port, long _connect_timeout, long _read_timeout, AEProxyHandler _proxy_handler) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidclose(AEProxyConnectionImpl processor) voiddestroy()intgetPort()protected voidrequestConnectSelect(AEProxyConnectionImpl processor, SocketChannel sc) protected voidrequestReadSelect(AEProxyConnectionImpl processor, SocketChannel sc) protected voidrequestWriteSelect(AEProxyConnectionImpl processor, SocketChannel sc) voidselectFailure(VirtualChannelSelector selector, SocketChannel sc, Object attachment, Throwable msg) Called when a channel selection fails.protected voidselectLoop(VirtualChannelSelector selector) booleanselectSuccess(VirtualChannelSelector selector, SocketChannel sc, Object attachment) Called when a channel is successfully selected for readyness.voidsetAllowExternalConnections(boolean permit)
-
Field Details
-
LOGID
-
DEBUG_PERIOD
private static final int DEBUG_PERIOD- See Also:
-
last_debug
private long last_debug -
port
private int port -
connect_timeout
private final long connect_timeout -
read_timeout
private final long read_timeout -
proxy_handler
-
ssc
-
read_selector
-
connect_selector
-
write_selector
-
processors
-
write_select_regs
-
allow_external_access
private boolean allow_external_access -
this_mon
-
destroyed
private volatile boolean destroyed
-
-
Constructor Details
-
AEProxyImpl
public AEProxyImpl(int _port, long _connect_timeout, long _read_timeout, AEProxyHandler _proxy_handler) throws AEProxyException - Throws:
AEProxyException
-
-
Method Details
-
setAllowExternalConnections
public void setAllowExternalConnections(boolean permit) - Specified by:
setAllowExternalConnectionsin interfaceAEProxy
-
acceptLoop
-
close
-
selectLoop
-
checkTimeouts
protected void checkTimeouts() -
requestWriteSelect
-
cancelWriteSelect
-
requestReadSelect
-
cancelReadSelect
-
requestConnectSelect
-
cancelConnectSelect
-
selectSuccess
Description copied from interface:VirtualChannelSelector.VirtualSelectorListenerCalled when a channel is successfully selected for readyness.- Specified by:
selectSuccessin interfaceVirtualChannelSelector.VirtualSelectorListener- Parameters:
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.VirtualSelectorListenerCalled when a channel selection fails.- Specified by:
selectFailurein interfaceVirtualChannelSelector.VirtualSelectorListener- Parameters:
msg- failure message
-
getPort
-
destroy
-