Package com.biglybt.core.proxy.impl
Class AEProxyConnectionImpl
java.lang.Object
com.biglybt.core.proxy.impl.AEProxyConnectionImpl
- All Implemented Interfaces:
AEProxyConnection
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected boolean
protected final List
private static final LogIDs
protected AEProxyState
protected AEProxyState
protected AEProxyState
protected final AEProxyImpl
protected final SocketChannel
protected long
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AEProxyConnectionImpl
(AEProxyImpl _server, SocketChannel _socket, AEProxyHandler _handler) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
void
close()
close the connectionprotected boolean
connect
(SocketChannel sc) void
indicate that the connection has failedgetName()
returns the non-blocking channel associated with the initiator of this proxy connectionprotected String
protected long
boolean
isClosed()
protected boolean
protected boolean
read
(SocketChannel sc) void
void
void
void
void
marks the transition between connecting and connectedvoid
setConnectState
(AEProxyState state) void
setReadState
(AEProxyState state) void
marks the last time that something happened on the connection for read timeout purposesvoid
setWriteState
(AEProxyState state) protected boolean
write
(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:
getName
in interfaceAEProxyConnection
-
getSourceChannel
Description copied from interface:AEProxyConnection
returns the non-blocking channel associated with the initiator of this proxy connection- Specified by:
getSourceChannel
in interfaceAEProxyConnection
- Returns:
-
setReadState
- Specified by:
setReadState
in interfaceAEProxyConnection
-
setWriteState
- Specified by:
setWriteState
in interfaceAEProxyConnection
-
setConnectState
- Specified by:
setConnectState
in interfaceAEProxyConnection
-
read
-
write
-
connect
-
requestWriteSelect
- Specified by:
requestWriteSelect
in interfaceAEProxyConnection
-
cancelWriteSelect
- Specified by:
cancelWriteSelect
in interfaceAEProxyConnection
-
requestConnectSelect
- Specified by:
requestConnectSelect
in interfaceAEProxyConnection
-
cancelConnectSelect
- Specified by:
cancelConnectSelect
in interfaceAEProxyConnection
-
requestReadSelect
- Specified by:
requestReadSelect
in interfaceAEProxyConnection
-
cancelReadSelect
- Specified by:
cancelReadSelect
in interfaceAEProxyConnection
-
failed
Description copied from interface:AEProxyConnection
indicate that the connection has failed- Specified by:
failed
in interfaceAEProxyConnection
- Parameters:
reason
-
-
close
public void close()Description copied from interface:AEProxyConnection
close the connection- Specified by:
close
in interfaceAEProxyConnection
-
isClosed
public boolean isClosed()- Specified by:
isClosed
in interfaceAEProxyConnection
-
setConnected
public void setConnected()Description copied from interface:AEProxyConnection
marks the transition between connecting and connected- Specified by:
setConnected
in interfaceAEProxyConnection
-
isConnected
protected boolean isConnected() -
setTimeStamp
public void setTimeStamp()Description copied from interface:AEProxyConnection
marks the last time that something happened on the connection for read timeout purposes- Specified by:
setTimeStamp
in interfaceAEProxyConnection
-
getTimeStamp
protected long getTimeStamp() -
addListener
- Specified by:
addListener
in interfaceAEProxyConnection
-
removeListener
- Specified by:
removeListener
in interfaceAEProxyConnection
-
getStateString
-