|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aelitis.azureus.core.clientmessageservice.impl.ClientConnection
public class ClientConnection
Constructor Summary | |
---|---|
ClientConnection(SocketChannel channel)
Create a new connection based on an incoming socket. |
|
ClientConnection(TCPTransportImpl transport)
Create a new connection based on an already-established outgoing socket. |
Method Summary | |
---|---|
void |
close(Throwable reason)
|
void |
closePending()
Marks the socket as complete and ready to undergo any close-delay prior to it being closed by the server |
Throwable |
getClosingReason()
|
String |
getDebugString()
|
long |
getLastActivityTime()
Get the last time this connection had read or write activity. |
boolean |
getLastReadMadeProgress()
|
boolean |
getLastWriteMadeProgress()
|
SocketChannel |
getSocketChannel()
|
Object |
getUserData(Object key)
|
boolean |
isClosePending()
|
Message[] |
readMessages()
Get any messages read from the client. |
void |
resetLastActivityTime()
Reset the last activity time to the current time. |
void |
sendMessage(ClientMessage client_msg,
Message msg)
|
void |
setClosingReason(Throwable r)
|
void |
setDebugString(String debug)
|
void |
setMaximumMessageSize(int max_bytes)
|
void |
setUserData(Object key,
Object data)
|
boolean |
writeMessages()
Write any queued messages back to the client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientConnection(SocketChannel channel)
channel
- public ClientConnection(TCPTransportImpl transport)
transport
- parentMethod Detail |
---|
public Message[] readMessages() throws IOException
IOException
- on errorpublic boolean getLastReadMadeProgress()
public boolean getLastWriteMadeProgress()
public void sendMessage(ClientMessage client_msg, Message msg)
public boolean writeMessages() throws IOException
IOException
- on errorpublic void close(Throwable reason)
public void closePending()
public boolean isClosePending()
public SocketChannel getSocketChannel()
public long getLastActivityTime()
public void resetLastActivityTime()
public void setClosingReason(Throwable r)
public Throwable getClosingReason()
public Object getUserData(Object key)
public void setUserData(Object key, Object data)
public void setDebugString(String debug)
public String getDebugString()
public void setMaximumMessageSize(int max_bytes)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |