|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.presents.client.Communicator
com.threerings.presents.client.BlockingCommunicator
com.threerings.presents.client.ClientCommunicator
public class ClientCommunicator
Customizes the blocking communicator with some things that we only do on users' machines (where there's only one client running, not potentially dozens, and where we're not sending high volumes of traffic through the client like we do for inter-server communications). This will go away when we create a special non-blocking communicator for use on the server that integrates with the ClientManager.
| Nested Class Summary | |
|---|---|
protected class |
ClientCommunicator.PrefPortInterval
Used to save our preferred port once we know our connection is not going to be unceremoniously closed by Windows Connection Sharing. |
| Nested classes/interfaces inherited from class com.threerings.presents.client.BlockingCommunicator |
|---|
BlockingCommunicator.DatagramReader, BlockingCommunicator.DatagramWriter, BlockingCommunicator.Reader, BlockingCommunicator.TerminationMessage, BlockingCommunicator.Writer |
| Field Summary | |
|---|---|
protected static RuntimeAdjust.BooleanAdjust |
_logMessages
Used to control low-level message logging. |
protected ClientCommunicator.PrefPortInterval |
_prefPortInterval
We use this interval to record the preferred port if it stays connected long enough. |
protected static long |
PREF_PORT_DELAY
Time a port must remain connected before we mark it as preferred. |
| Fields inherited from class com.threerings.presents.client.BlockingCommunicator |
|---|
_bout, _buf, _channel, _datagramChannel, _datagramReader, _datagramWriter, _dataq, _digest, _fin, _fout, _loader, _logonError, _msgq, _oin, _oout, _reader, _secret, _selector, _sequencer, _uout, _writer, DATAGRAM_ATTEMPTS_PER_PORT, DATAGRAM_RESPONSE_WAIT |
| Fields inherited from class com.threerings.presents.client.Communicator |
|---|
_client, _lastWrite, _omgr |
| Constructor Summary | |
|---|---|
ClientCommunicator(Client client)
|
|
| Method Summary | |
|---|---|
protected boolean |
clearPPI(boolean cancel)
Cancels our preferred port saving interval. |
protected boolean |
debugLogMessages()
|
protected int |
getPrefPort(String key,
int defaultPort)
Gets our preferred connection port via our preferences mechanism. |
protected void |
openChannel(InetAddress host)
|
protected void |
readerDidExit()
Callback called by the reader thread when it goes away. |
protected void |
setPrefPort(String key,
int port)
Sets our preferred connection port via our preferences mechanism. |
| Methods inherited from class com.threerings.presents.client.BlockingCommunicator |
|---|
closeChannel, closeDatagramChannel, connectionClosed, connectionFailed, datagramReaderDidExit, datagramWriterDidExit, getLastWrite, getTransmitDatagrams, gotBootstrap, logoff, logon, logonSucceeded, postMessage, readDatagram, readFrame, receiveDatagram, receiveMessage, sendDatagram, sendMessage, setClassLoader, throttleOutgoingMessage, writeDatagram, writeMessage, writerDidExit |
| Methods inherited from class com.threerings.presents.client.Communicator |
|---|
clientCleanup, gotAuthResponse, notifyClientObservers, processMessage, updateWriteStamp |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ClientCommunicator.PrefPortInterval _prefPortInterval
protected static RuntimeAdjust.BooleanAdjust _logMessages
protected static long PREF_PORT_DELAY
| Constructor Detail |
|---|
public ClientCommunicator(Client client)
| Method Detail |
|---|
protected void setPrefPort(String key,
int port)
protected int getPrefPort(String key,
int defaultPort)
protected void openChannel(InetAddress host)
throws IOException
openChannel in class BlockingCommunicatorIOExceptionprotected void readerDidExit()
BlockingCommunicator
readerDidExit in class BlockingCommunicatorprotected boolean debugLogMessages()
debugLogMessages in class BlockingCommunicatorprotected boolean clearPPI(boolean cancel)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||