|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aelitis.azureus.core.proxy.impl.AEProxyConnectionImpl
public class AEProxyConnectionImpl
Field Summary | |
---|---|
protected boolean |
is_closed
|
protected boolean |
is_connected
|
protected List |
listeners
|
protected AEProxyState |
proxy_connect_state
|
protected AEProxyState |
proxy_read_state
|
protected AEProxyState |
proxy_write_state
|
protected AEProxyImpl |
server
|
protected SocketChannel |
source_channel
|
protected long |
time_stamp
|
Constructor Summary | |
---|---|
protected |
AEProxyConnectionImpl(AEProxyImpl _server,
SocketChannel _socket,
AEProxyHandler _handler)
|
Method Summary | |
---|---|
void |
addListener(AEProxyConnectionListener l)
|
void |
cancelConnectSelect(SocketChannel sc)
|
void |
cancelReadSelect(SocketChannel sc)
|
void |
cancelWriteSelect(SocketChannel sc)
|
void |
close()
close the connection |
protected boolean |
connect(SocketChannel sc)
|
void |
failed(Throwable reason)
indicate that the connection has failed |
String |
getName()
|
SocketChannel |
getSourceChannel()
returns the non-blocking channel associated with the initiator of this proxy connection |
protected String |
getStateString()
|
protected long |
getTimeStamp()
|
boolean |
isClosed()
|
protected boolean |
isConnected()
|
protected boolean |
read(SocketChannel sc)
|
void |
removeListener(AEProxyConnectionListener l)
|
void |
requestConnectSelect(SocketChannel sc)
|
void |
requestReadSelect(SocketChannel sc)
|
void |
requestWriteSelect(SocketChannel sc)
|
void |
setConnected()
marks the transition between connecting and connected |
void |
setConnectState(AEProxyState state)
|
void |
setReadState(AEProxyState state)
|
void |
setTimeStamp()
marks the last time that something happened on the connection for read timeout purposes |
void |
setWriteState(AEProxyState state)
|
protected boolean |
write(SocketChannel sc)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final AEProxyImpl server
protected final SocketChannel source_channel
protected volatile AEProxyState proxy_read_state
protected volatile AEProxyState proxy_write_state
protected volatile AEProxyState proxy_connect_state
protected long time_stamp
protected boolean is_connected
protected boolean is_closed
protected final List listeners
Constructor Detail |
---|
protected AEProxyConnectionImpl(AEProxyImpl _server, SocketChannel _socket, AEProxyHandler _handler)
Method Detail |
---|
public String getName()
getName
in interface AEProxyConnection
public SocketChannel getSourceChannel()
AEProxyConnection
getSourceChannel
in interface AEProxyConnection
public void setReadState(AEProxyState state)
setReadState
in interface AEProxyConnection
public void setWriteState(AEProxyState state)
setWriteState
in interface AEProxyConnection
public void setConnectState(AEProxyState state)
setConnectState
in interface AEProxyConnection
protected boolean read(SocketChannel sc)
protected boolean write(SocketChannel sc)
protected boolean connect(SocketChannel sc)
public void requestWriteSelect(SocketChannel sc)
requestWriteSelect
in interface AEProxyConnection
public void cancelWriteSelect(SocketChannel sc)
cancelWriteSelect
in interface AEProxyConnection
public void requestConnectSelect(SocketChannel sc)
requestConnectSelect
in interface AEProxyConnection
public void cancelConnectSelect(SocketChannel sc)
cancelConnectSelect
in interface AEProxyConnection
public void requestReadSelect(SocketChannel sc)
requestReadSelect
in interface AEProxyConnection
public void cancelReadSelect(SocketChannel sc)
cancelReadSelect
in interface AEProxyConnection
public void failed(Throwable reason)
AEProxyConnection
failed
in interface AEProxyConnection
public void close()
AEProxyConnection
close
in interface AEProxyConnection
public boolean isClosed()
isClosed
in interface AEProxyConnection
public void setConnected()
AEProxyConnection
setConnected
in interface AEProxyConnection
protected boolean isConnected()
public void setTimeStamp()
AEProxyConnection
setTimeStamp
in interface AEProxyConnection
protected long getTimeStamp()
public void addListener(AEProxyConnectionListener l)
addListener
in interface AEProxyConnection
public void removeListener(AEProxyConnectionListener l)
removeListener
in interface AEProxyConnection
protected String getStateString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |