|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.presents.client.Communicator
public abstract class Communicator
Handles sending and receiving messages for the client.
| Field Summary | |
|---|---|
protected Client |
_client
|
protected long |
_lastWrite
|
protected ClientDObjectMgr |
_omgr
|
| Constructor Summary | |
|---|---|
Communicator(Client client)
Creates a new communicator instance which is associated with the supplied client. |
|
| Method Summary | |
|---|---|
protected void |
clientCleanup(Exception logonError)
|
long |
getLastWrite()
Returns the time at which we last sent a packet to the server. |
boolean |
getTransmitDatagrams()
Checks whether we should transmit datagrams. |
protected void |
gotAuthResponse(AuthResponse rsp)
Subclasses must call this method when they receive the authentication response. |
abstract void |
gotBootstrap()
Notifies the communicator that the client has received its bootstrap data. |
abstract void |
logoff()
Delivers a logoff notification to the server and shuts down the network connection. |
abstract void |
logon()
Logs on to the server and initiates our full-duplex message exchange. |
protected void |
logonSucceeded(AuthResponseData data)
Called when the authentication process completes successfully. |
protected void |
notifyClientObservers(ObserverOps.Session op)
|
abstract void |
postMessage(UpstreamMessage msg)
Queues up the specified message for delivery upstream. |
protected void |
processMessage(Message msg)
Callback called by the reader thread when it has parsed a new message from the socket and wishes to have it processed. |
abstract void |
setClassLoader(ClassLoader loader)
Configures this communicator with a custom class loader to be used when reading and writing objects over the network. |
protected void |
updateWriteStamp()
Makes a note of the time at which we last communicated with the server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Client _client
protected ClientDObjectMgr _omgr
protected long _lastWrite
| Constructor Detail |
|---|
public Communicator(Client client)
| Method Detail |
|---|
public abstract void logon()
public abstract void logoff()
public abstract void gotBootstrap()
public abstract void postMessage(UpstreamMessage msg)
public abstract void setClassLoader(ClassLoader loader)
public long getLastWrite()
public boolean getTransmitDatagrams()
protected void updateWriteStamp()
protected void gotAuthResponse(AuthResponse rsp)
throws LogonException
LogonExceptionprotected void logonSucceeded(AuthResponseData data)
protected void processMessage(Message msg)
protected void notifyClientObservers(ObserverOps.Session op)
protected void clientCleanup(Exception logonError)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||