Class AEProxyConnectionImpl
java.lang.Object
com.biglybt.core.proxy.impl.AEProxyConnectionImpl
- All Implemented Interfaces:
AEProxyConnection
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected final Listprivate static final LogIDsprotected AEProxyStateprotected AEProxyStateprotected AEProxyStateprotected final AEProxyImplprotected final SocketChannelprotected long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAEProxyConnectionImpl(AEProxyImpl _server, SocketChannel _socket, AEProxyHandler _handler) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidclose()close the connectionprotected booleanconnect(SocketChannel sc) voidindicate that the connection has failedgetName()returns the non-blocking channel associated with the initiator of this proxy connectionprotected Stringprotected longbooleanisClosed()protected booleanprotected booleanread(SocketChannel sc) voidvoidvoidvoidvoidmarks the transition between connecting and connectedvoidsetConnectState(AEProxyState state) voidsetReadState(AEProxyState state) voidmarks the last time that something happened on the connection for read timeout purposesvoidsetWriteState(AEProxyState state) protected booleanwrite(SocketChannel sc)
-
Field Details
-
LOGID
-
server
-
source_channel
-
proxy_read_state
-
proxy_write_state
-
proxy_connect_state
-
time_stamp
protected long time_stamp -
is_connected
protected boolean is_connected -
is_closed
protected boolean is_closed -
listeners
-
-
Constructor Details
-
AEProxyConnectionImpl
protected AEProxyConnectionImpl(AEProxyImpl _server, SocketChannel _socket, AEProxyHandler _handler)
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceAEProxyConnection
-
getSourceChannel
Description copied from interface:AEProxyConnectionreturns the non-blocking channel associated with the initiator of this proxy connection- Specified by:
getSourceChannelin interfaceAEProxyConnection- Returns:
-
setReadState
- Specified by:
setReadStatein interfaceAEProxyConnection
-
setWriteState
- Specified by:
setWriteStatein interfaceAEProxyConnection
-
setConnectState
- Specified by:
setConnectStatein interfaceAEProxyConnection
-
read
-
write
-
connect
-
requestWriteSelect
- Specified by:
requestWriteSelectin interfaceAEProxyConnection
-
cancelWriteSelect
- Specified by:
cancelWriteSelectin interfaceAEProxyConnection
-
requestConnectSelect
- Specified by:
requestConnectSelectin interfaceAEProxyConnection
-
cancelConnectSelect
- Specified by:
cancelConnectSelectin interfaceAEProxyConnection
-
requestReadSelect
- Specified by:
requestReadSelectin interfaceAEProxyConnection
-
cancelReadSelect
- Specified by:
cancelReadSelectin interfaceAEProxyConnection
-
failed
Description copied from interface:AEProxyConnectionindicate that the connection has failed- Specified by:
failedin interfaceAEProxyConnection- Parameters:
reason-
-
close
public void close()Description copied from interface:AEProxyConnectionclose the connection- Specified by:
closein interfaceAEProxyConnection
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceAEProxyConnection
-
setConnected
public void setConnected()Description copied from interface:AEProxyConnectionmarks the transition between connecting and connected- Specified by:
setConnectedin interfaceAEProxyConnection
-
isConnected
protected boolean isConnected() -
setTimeStamp
public void setTimeStamp()Description copied from interface:AEProxyConnectionmarks the last time that something happened on the connection for read timeout purposes- Specified by:
setTimeStampin interfaceAEProxyConnection
-
getTimeStamp
protected long getTimeStamp() -
addListener
- Specified by:
addListenerin interfaceAEProxyConnection
-
removeListener
- Specified by:
removeListenerin interfaceAEProxyConnection
-
getStateString
-