diff --git a/src/java/com/threerings/presents/client/ClientDObjectMgr.java b/src/java/com/threerings/presents/client/ClientDObjectMgr.java index 86fee9351..1919c0d52 100644 --- a/src/java/com/threerings/presents/client/ClientDObjectMgr.java +++ b/src/java/com/threerings/presents/client/ClientDObjectMgr.java @@ -35,8 +35,25 @@ import com.samskivert.util.StringUtil; import com.samskivert.util.IntMap; import com.samskivert.util.Interval; -import com.threerings.presents.dobj.*; -import com.threerings.presents.net.*; +import com.threerings.presents.dobj.CompoundEvent; +import com.threerings.presents.dobj.DEvent; +import com.threerings.presents.dobj.DObject; +import com.threerings.presents.dobj.DObjectManager; +import com.threerings.presents.dobj.ObjectAccessException; +import com.threerings.presents.dobj.ObjectDestroyedEvent; +import com.threerings.presents.dobj.Subscriber; + +import com.threerings.presents.net.BootstrapData; +import com.threerings.presents.net.BootstrapNotification; +import com.threerings.presents.net.DownstreamMessage; +import com.threerings.presents.net.EventNotification; +import com.threerings.presents.net.FailureResponse; +import com.threerings.presents.net.ForwardEventRequest; +import com.threerings.presents.net.ObjectResponse; +import com.threerings.presents.net.PongResponse; +import com.threerings.presents.net.SubscribeRequest; +import com.threerings.presents.net.UnsubscribeRequest; +import com.threerings.presents.net.UnsubscribeResponse; import static com.threerings.presents.Log.log; diff --git a/src/java/com/threerings/presents/dobj/DObject.java b/src/java/com/threerings/presents/dobj/DObject.java index a13b8922e..692d029e9 100644 --- a/src/java/com/threerings/presents/dobj/DObject.java +++ b/src/java/com/threerings/presents/dobj/DObject.java @@ -913,7 +913,7 @@ public class DObject protected transient boolean _deathWish = false; /** Maintains a mapping of sorted field arrays for each distributed object class. */ - protected static HashMap _ftable = new HashMap(); + protected static HashMap _ftable = new HashMap(); /** Used to sort and search {@link #_fields}. */ protected static final Comparator FIELD_COMP = new Comparator() { diff --git a/src/java/com/threerings/presents/dobj/DSet.java b/src/java/com/threerings/presents/dobj/DSet.java index 015395110..b6b9bb17f 100644 --- a/src/java/com/threerings/presents/dobj/DSet.java +++ b/src/java/com/threerings/presents/dobj/DSet.java @@ -28,7 +28,6 @@ import java.util.ConcurrentModificationException; import java.util.Iterator; import com.samskivert.util.ArrayUtil; -import com.samskivert.util.StringUtil; import com.threerings.io.ObjectInputStream; import com.threerings.io.ObjectOutputStream; @@ -49,6 +48,8 @@ import static com.threerings.presents.Log.log; * case of entry removal, only the key for the entry to be removed will be transmitted with the * removal event to save network bandwidth. Lastly, the object returned by {@link Entry#getKey} * must be a {@link Streamable} type. + * + * @param the type of entry stored in this set. */ public class DSet implements Iterable, Streamable, Cloneable @@ -197,10 +198,8 @@ public class DSet public Iterator iterator () { // the crazy sanity checks - if (_size < 0 ||_size > _entries.length || - (_size > 0 && _entries[_size-1] == null)) { - log.warning("DSet in a bad way [size=" + _size + - ", entries=" + StringUtil.toString(_entries) + "]."); + if (_size < 0 || _size > _entries.length || (_size > 0 && _entries[_size-1] == null)) { + log.warning("DSet in a bad way", "size", _size, "entries", _entries); Thread.dumpStack(); } @@ -221,9 +220,8 @@ public class DSet throw new ConcurrentModificationException(); } if (_ssize != _size) { - log.warning("Size changed during iteration [ssize=" + _ssize + - ", nsize=" + _size + - ", entsries=" + StringUtil.toString(_entries) + "]."); + log.warning("Size changed during iteration", "ssize", _ssize, "nsize", _size, + "entries", _entries); Thread.dumpStack(); } } @@ -460,6 +458,7 @@ public class DSet } } + /** Used to search for keys. */ protected static class KeyWrapper implements DSet.Entry { public KeyWrapper (Comparable key) { diff --git a/src/java/com/threerings/presents/dobj/DynamicListener.java b/src/java/com/threerings/presents/dobj/DynamicListener.java index d37470a29..2b0899724 100644 --- a/src/java/com/threerings/presents/dobj/DynamicListener.java +++ b/src/java/com/threerings/presents/dobj/DynamicListener.java @@ -44,7 +44,7 @@ public class DynamicListener { this(target, new MethodFinder(target.getClass())); } - + /** * Creates a listener that dynamically dispatches events on the supplied * target using the methods in finder. @@ -140,5 +140,5 @@ public class DynamicListener protected MethodFinder _finder; /** A cache of already resolved methods. */ - protected HashMap _mcache = new HashMap(); + protected HashMap _mcache = new HashMap(); } diff --git a/src/java/com/threerings/presents/dobj/EntryAddedEvent.java b/src/java/com/threerings/presents/dobj/EntryAddedEvent.java index 2f152388b..b9013bce8 100644 --- a/src/java/com/threerings/presents/dobj/EntryAddedEvent.java +++ b/src/java/com/threerings/presents/dobj/EntryAddedEvent.java @@ -29,6 +29,9 @@ import com.samskivert.util.StringUtil; * posted to the dobjmgr. * * @see DObjectManager#postEvent + * + * @param the type of entry being handled by this event. This must match the type on the set + * that generated this event. */ public class EntryAddedEvent extends NamedEvent { diff --git a/src/java/com/threerings/presents/dobj/EntryRemovedEvent.java b/src/java/com/threerings/presents/dobj/EntryRemovedEvent.java index ccc240bc9..2932f9beb 100644 --- a/src/java/com/threerings/presents/dobj/EntryRemovedEvent.java +++ b/src/java/com/threerings/presents/dobj/EntryRemovedEvent.java @@ -29,6 +29,9 @@ import static com.threerings.presents.Log.log; * posted to the dobjmgr. * * @see DObjectManager#postEvent + * + * @param the type of entry being handled by this event. This must match the type on the set + * that generated this event. */ public class EntryRemovedEvent extends NamedEvent { diff --git a/src/java/com/threerings/presents/dobj/EntryUpdatedEvent.java b/src/java/com/threerings/presents/dobj/EntryUpdatedEvent.java index 22d545c11..56567c727 100644 --- a/src/java/com/threerings/presents/dobj/EntryUpdatedEvent.java +++ b/src/java/com/threerings/presents/dobj/EntryUpdatedEvent.java @@ -32,6 +32,9 @@ import static com.threerings.presents.Log.log; * constructed to request the update of an entry and posted to the dobjmgr. * * @see DObjectManager#postEvent + * + * @param the type of entry being handled by this event. This must match the type on the set + * that generated this event. */ public class EntryUpdatedEvent extends NamedEvent { diff --git a/src/java/com/threerings/presents/dobj/SetAdapter.java b/src/java/com/threerings/presents/dobj/SetAdapter.java index a8eedf9f1..d5b3a584a 100644 --- a/src/java/com/threerings/presents/dobj/SetAdapter.java +++ b/src/java/com/threerings/presents/dobj/SetAdapter.java @@ -24,10 +24,13 @@ package com.threerings.presents.dobj; /** * Implements the methods in SetListener so that you don't have to implement the ones you don't * want to. - * + * *

NOTE: This adapter will receive all Entry events from a DObject it's * listening to, so it should check that the event's name matches the field it's interested in * before acting on the event. + * + * @param the type of entry being handled by this listener. This must match the type on the set + * that generates the events. */ public class SetAdapter implements SetListener { diff --git a/src/java/com/threerings/presents/dobj/SetListener.java b/src/java/com/threerings/presents/dobj/SetListener.java index 76fae9180..87b3ab450 100644 --- a/src/java/com/threerings/presents/dobj/SetListener.java +++ b/src/java/com/threerings/presents/dobj/SetListener.java @@ -24,12 +24,15 @@ package com.threerings.presents.dobj; /** * Implemented by entities which wish to hear about changes that occur to set attributes of a * particular distributed object. - * + * *

NOTE: This listener will receive all Entry events from a DObject it's * listening to, so it should check that the event's name matches the field it's interested in * before acting on the event. - * + * * @see DObject#addListener + * + * @param the type of entry being handled by this listener. This must match the type on the set + * that generates the events. */ public interface SetListener extends ChangeListener { diff --git a/src/java/com/threerings/presents/dobj/Subscriber.java b/src/java/com/threerings/presents/dobj/Subscriber.java index b224d426e..7a8fc2ad6 100644 --- a/src/java/com/threerings/presents/dobj/Subscriber.java +++ b/src/java/com/threerings/presents/dobj/Subscriber.java @@ -37,6 +37,8 @@ package com.threerings.presents.dobj; * @see AttributeChangeListener * @see SetListener * @see OidListListener + * + * @param the type object being subscribed to. */ public interface Subscriber { diff --git a/src/java/com/threerings/presents/net/EventNotification.java b/src/java/com/threerings/presents/net/EventNotification.java index de8db7638..ac025b2c3 100644 --- a/src/java/com/threerings/presents/net/EventNotification.java +++ b/src/java/com/threerings/presents/net/EventNotification.java @@ -23,6 +23,9 @@ package com.threerings.presents.net; import com.threerings.presents.dobj.DEvent; +/** + * Contains an event forwarded from the server. + */ public class EventNotification extends DownstreamMessage { /** diff --git a/src/java/com/threerings/presents/net/FailureResponse.java b/src/java/com/threerings/presents/net/FailureResponse.java index ce366e3ca..d7e6a0db6 100644 --- a/src/java/com/threerings/presents/net/FailureResponse.java +++ b/src/java/com/threerings/presents/net/FailureResponse.java @@ -21,6 +21,9 @@ package com.threerings.presents.net; +/** + * Communicates failure to subscribe to an object. + */ public class FailureResponse extends DownstreamMessage { /** diff --git a/src/java/com/threerings/presents/net/ForwardEventRequest.java b/src/java/com/threerings/presents/net/ForwardEventRequest.java index c64a0b528..edcf8251a 100644 --- a/src/java/com/threerings/presents/net/ForwardEventRequest.java +++ b/src/java/com/threerings/presents/net/ForwardEventRequest.java @@ -23,6 +23,9 @@ package com.threerings.presents.net; import com.threerings.presents.dobj.DEvent; +/** + * Forwards an event to the server for dispatch. + */ public class ForwardEventRequest extends UpstreamMessage { /** diff --git a/src/java/com/threerings/presents/net/LogoffRequest.java b/src/java/com/threerings/presents/net/LogoffRequest.java index 572e2f944..697aa3978 100644 --- a/src/java/com/threerings/presents/net/LogoffRequest.java +++ b/src/java/com/threerings/presents/net/LogoffRequest.java @@ -21,6 +21,9 @@ package com.threerings.presents.net; +/** + * Requests to end our session with the server. + */ public class LogoffRequest extends UpstreamMessage { /** diff --git a/src/java/com/threerings/presents/net/ObjectResponse.java b/src/java/com/threerings/presents/net/ObjectResponse.java index 2356b8eef..d6023cd71 100644 --- a/src/java/com/threerings/presents/net/ObjectResponse.java +++ b/src/java/com/threerings/presents/net/ObjectResponse.java @@ -23,6 +23,11 @@ package com.threerings.presents.net; import com.threerings.presents.dobj.DObject; +/** + * Contains a distributed object to which the client has subscribed. + * + * @param the type of object delivered by the response. + */ public class ObjectResponse extends DownstreamMessage { diff --git a/src/java/com/threerings/presents/net/PingRequest.java b/src/java/com/threerings/presents/net/PingRequest.java index 06d76143a..4d692bad1 100644 --- a/src/java/com/threerings/presents/net/PingRequest.java +++ b/src/java/com/threerings/presents/net/PingRequest.java @@ -26,11 +26,13 @@ import java.io.IOException; import com.threerings.io.ObjectInputStream; import com.threerings.io.ObjectOutputStream; +/** + * Let's the server know we're still alive. + */ public class PingRequest extends UpstreamMessage { - /** The number of milliseconds of idle upstream that are allowed to - * elapse before the client sends a ping message to the server to let - * it know that we're still alive. */ + /** The number of milliseconds of idle upstream that are allowed to elapse before the client + * sends a ping message to the server to let it know that we're still alive. */ public static final long PING_INTERVAL = 60 * 1000L; /** @@ -50,8 +52,8 @@ public class PingRequest extends UpstreamMessage } /** - * Returns a timestamp that was obtained when this packet was encoded - * by the low-level networking code. + * Returns a timestamp that was obtained when this packet was encoded by the low-level + * networking code. */ public long getPackStamp () { @@ -59,8 +61,8 @@ public class PingRequest extends UpstreamMessage } /** - * Returns a timestamp that was obtained when this packet was decoded - * by the low-level networking code. + * Returns a timestamp that was obtained when this packet was decoded by the low-level + * networking code. */ public long getUnpackStamp () { @@ -73,8 +75,8 @@ public class PingRequest extends UpstreamMessage public void writeObject (ObjectOutputStream out) throws IOException { - // grab a timestamp noting when we were encoded into a raw buffer - // for delivery over the network + // grab a timestamp noting when we were encoded into a raw buffer for delivery over the + // network _packStamp = System.currentTimeMillis(); out.defaultWriteObject(); @@ -86,8 +88,8 @@ public class PingRequest extends UpstreamMessage public void readObject (ObjectInputStream in) throws IOException, ClassNotFoundException { - // grab a timestamp noting when we were decoded from a raw buffer - // after being received over the network + // grab a timestamp noting when we were decoded from a raw buffer after being received over + // the network _unpackStamp = System.currentTimeMillis(); in.defaultReadObject(); @@ -114,9 +116,8 @@ public class PingRequest extends UpstreamMessage /** A time stamp obtained when we serialize this object. */ protected transient long _packStamp; - /** A time stamp obtained when we unserialize this object (the intent - * is to get a timestamp as close as possible to when the packet was - * received on the network). */ + /** A time stamp obtained when we unserialize this object (the intent is to get a timestamp as + * close as possible to when the packet was received on the network). */ protected transient long _unpackStamp; /** The transport parameters. */ diff --git a/src/java/com/threerings/presents/net/PongResponse.java b/src/java/com/threerings/presents/net/PongResponse.java index 21306ea91..ed604c8a1 100644 --- a/src/java/com/threerings/presents/net/PongResponse.java +++ b/src/java/com/threerings/presents/net/PongResponse.java @@ -28,6 +28,10 @@ import com.threerings.io.ObjectOutputStream; import static com.threerings.presents.Log.log; +/** + * Let's the client know the server heard its ping (and that the server and connection are still + * alive). + */ public class PongResponse extends DownstreamMessage { /** @@ -39,20 +43,19 @@ public class PongResponse extends DownstreamMessage } /** - * Constructs a pong response which will use the supplied ping time to - * establish the end-to-end processing delay introduced by the server. + * Constructs a pong response which will use the supplied ping time to establish the end-to-end + * processing delay introduced by the server. */ public PongResponse (long pingStamp, Transport transport) { - // save this for when we are serialized in preparation for - // delivery over the network + // save this for when we are serialized in preparation for delivery over the network _pingStamp = pingStamp; _transport = transport; } /** - * Returns the time at which this packet was packed for delivery in - * the time frame of the server that sent the packet. + * Returns the time at which this packet was packed for delivery in the time frame of the + * server that sent the packet. */ public long getPackStamp () { @@ -60,9 +63,9 @@ public class PongResponse extends DownstreamMessage } /** - * Returns the number of milliseconds that elapsed between the time - * that the ping which instigated this pong was read from the network - * and the time that this pong was written to the network. + * Returns the number of milliseconds that elapsed between the time that the ping which + * instigated this pong was read from the network and the time that this pong was written to + * the network. */ public int getProcessDelay () { @@ -70,8 +73,8 @@ public class PongResponse extends DownstreamMessage } /** - * Returns a timestamp that was obtained when this packet was decoded - * by the low-level networking code. + * Returns a timestamp that was obtained when this packet was decoded by the low-level + * networking code. */ public long getUnpackStamp () { @@ -87,8 +90,7 @@ public class PongResponse extends DownstreamMessage // make a note of the time at which we were packed _packStamp = System.currentTimeMillis(); - // the time spent between unpacking the ping and packing the pong - // is the processing delay + // the time spent between unpacking the ping and packing the pong is the processing delay if (_pingStamp == 0L) { log.warning("Pong response written that was not constructed " + "with a valid ping stamp [rsp=" + this + "]."); @@ -106,8 +108,8 @@ public class PongResponse extends DownstreamMessage public void readObject (ObjectInputStream in) throws IOException, ClassNotFoundException { - // grab a timestamp noting when we were decoded from a raw buffer - // after being received over the network + // grab a timestamp noting when we were decoded from a raw buffer after being received over + // the network _unpackStamp = System.currentTimeMillis(); in.defaultReadObject(); @@ -131,23 +133,19 @@ public class PongResponse extends DownstreamMessage return "[type=PONG, msgid=" + messageId + ", transport=" + _transport + "]"; } - /** The ping unpack stamp provided at construct time to this pong - * response; only valid on the sending process, not the receiving - * process. */ + /** The ping unpack stamp provided at construct time to this pong response; only valid on the + * sending process, not the receiving process. */ protected transient long _pingStamp; - /** The timestamp obtained immediately before this packet was sent out - * over the network. */ + /** The timestamp obtained immediately before this packet was sent out over the network. */ protected long _packStamp; - /** The delay in milliseconds between the time that the ping request - * was read from the network and the time the pong response was - * written to the network. */ + /** The delay in milliseconds between the time that the ping request was read from the network + * and the time the pong response was written to the network. */ protected int _processDelay; - /** A time stamp obtained when we unserialize this object (the intent - * is to get a timestamp as close as possible to when the packet was - * received on the network). */ + /** A time stamp obtained when we unserialize this object (the intent is to get a timestamp as + * close as possible to when the packet was received on the network). */ protected transient long _unpackStamp; /** The transport parameters. */ diff --git a/src/java/com/threerings/presents/net/SubscribeRequest.java b/src/java/com/threerings/presents/net/SubscribeRequest.java index 832ec544f..1a7ac474b 100644 --- a/src/java/com/threerings/presents/net/SubscribeRequest.java +++ b/src/java/com/threerings/presents/net/SubscribeRequest.java @@ -21,6 +21,9 @@ package com.threerings.presents.net; +/** + * Requests to subscribe to a particular distributed object. + */ public class SubscribeRequest extends UpstreamMessage { /** diff --git a/src/java/com/threerings/presents/net/Transport.java b/src/java/com/threerings/presents/net/Transport.java index af5d17825..0fa04c7e9 100644 --- a/src/java/com/threerings/presents/net/Transport.java +++ b/src/java/com/threerings/presents/net/Transport.java @@ -25,8 +25,8 @@ import com.samskivert.util.HashIntMap; /** * Message transport parameters. These include the type of transport and the channel (used to - * define independent streams for ordered transport), and may eventually include message - * priority, etc. + * define independent streams for ordered transport), and may eventually include message priority, + * etc. */ public class Transport { @@ -109,8 +109,8 @@ public class Transport } protected boolean _reliable, _ordered; - } - + } + /** The unreliable/unordered mode of transport. */ public static final Transport UNRELIABLE_UNORDERED = getInstance(Type.UNRELIABLE_UNORDERED); diff --git a/src/java/com/threerings/presents/net/UnsubscribeRequest.java b/src/java/com/threerings/presents/net/UnsubscribeRequest.java index 173bf67f8..954c86825 100644 --- a/src/java/com/threerings/presents/net/UnsubscribeRequest.java +++ b/src/java/com/threerings/presents/net/UnsubscribeRequest.java @@ -21,6 +21,9 @@ package com.threerings.presents.net; +/** + * Requests to end a subscription to a particular distributed object. + */ public class UnsubscribeRequest extends UpstreamMessage { /** diff --git a/src/java/com/threerings/presents/net/UsernamePasswordCreds.java b/src/java/com/threerings/presents/net/UsernamePasswordCreds.java index 107b8801c..46dcf434f 100644 --- a/src/java/com/threerings/presents/net/UsernamePasswordCreds.java +++ b/src/java/com/threerings/presents/net/UsernamePasswordCreds.java @@ -23,6 +23,9 @@ package com.threerings.presents.net; import com.threerings.util.Name; +/** + * Extends the basic credentials with a password. + */ public class UsernamePasswordCreds extends Credentials { /** diff --git a/src/java/com/threerings/presents/peer/server/PeerManager.java b/src/java/com/threerings/presents/peer/server/PeerManager.java index 8e11dfddc..52e8ba0b3 100644 --- a/src/java/com/threerings/presents/peer/server/PeerManager.java +++ b/src/java/com/threerings/presents/peer/server/PeerManager.java @@ -376,7 +376,7 @@ public abstract class PeerManager return; } - final Tuple key = new Tuple(nodeName, remoteOid); + final Tuple key = new Tuple(nodeName, remoteOid); if (_proxies.containsKey(key)) { String errmsg = "Cannot proxy already proxied object [key=" + key + "]."; listener.requestFailed(new ObjectAccessException(errmsg)); @@ -387,7 +387,7 @@ public abstract class PeerManager peer.getDObjectManager().subscribeToObject(remoteOid, new Subscriber() { public void objectAvailable (T object) { // make a note of this proxy mapping - _proxies.put(key, new Tuple,DObject>(this, object)); + _proxies.put(key, new Tuple, DObject>(this, object)); // map the object into our local oid space _omgr.registerProxyObject(object, peer.getDObjectManager()); // then tell the caller about the (now remapped) oid @@ -405,8 +405,8 @@ public abstract class PeerManager */ public void unproxyRemoteObject (String nodeName, int remoteOid) { - Tuple key = new Tuple(nodeName, remoteOid); - Tuple,DObject> bits = _proxies.remove(key); + Tuple key = new Tuple(nodeName, remoteOid); + Tuple, DObject> bits = _proxies.remove(key); if (bits == null) { log.warning("Requested to clear unknown proxy [key=" + key + "]."); return; @@ -807,7 +807,7 @@ public abstract class PeerManager _nodes = _noderepo.loadNodes(); } @Override - public void handleSuccess() { + public void handleSuccess () { for (NodeRecord record : _nodes) { if (record.nodeName.equals(_nodeName)) { continue; @@ -1202,7 +1202,7 @@ public abstract class PeerManager protected String _nodeName, _sharedSecret; protected NodeRecord _self; protected NodeObject _nodeobj; - protected Map _peers = Maps.newHashMap(); + protected Map _peers = Maps.newHashMap(); /** Used to resolve dependencies in unserialized {@link NodeAction} instances. */ protected Injector _injector; @@ -1211,7 +1211,8 @@ public abstract class PeerManager protected ArrayIntSet _suboids = new ArrayIntSet(); /** Contains a mapping of proxied objects to subscriber instances. */ - protected Map,Tuple,DObject>> _proxies = Maps.newHashMap(); + protected Map, Tuple, DObject>> _proxies = + Maps.newHashMap(); /** Our stale cache observers. */ protected Map> _cacheobs = Maps.newHashMap(); diff --git a/src/java/com/threerings/presents/peer/server/persist/NodeRecord.java b/src/java/com/threerings/presents/peer/server/persist/NodeRecord.java index e8f442f9e..0f28252e4 100644 --- a/src/java/com/threerings/presents/peer/server/persist/NodeRecord.java +++ b/src/java/com/threerings/presents/peer/server/persist/NodeRecord.java @@ -77,7 +77,7 @@ public class NodeRecord extends PersistentRecord /** Increment this value if you modify the definition of this persistent * object in a way that will result in a change to its SQL counterpart. */ public static final int SCHEMA_VERSION = 1; - + /** The unique name assigned to this node. */ @Id @Column(name="NODE_NAME", length=64) diff --git a/src/java/com/threerings/presents/server/Authenticator.java b/src/java/com/threerings/presents/server/Authenticator.java index abd98db7b..baea236d0 100644 --- a/src/java/com/threerings/presents/server/Authenticator.java +++ b/src/java/com/threerings/presents/server/Authenticator.java @@ -55,7 +55,7 @@ public abstract class Authenticator invoker.postUnit(new Invoker.Unit("authenticateConnection") { @Override - public boolean invoke() { + public boolean invoke () { try { processAuthentication(conn, rsp); } catch (Exception e) { // Persistence or Runtime diff --git a/src/java/com/threerings/presents/server/ClientFactory.java b/src/java/com/threerings/presents/server/ClientFactory.java index 037a4d5f1..21ea7fc42 100644 --- a/src/java/com/threerings/presents/server/ClientFactory.java +++ b/src/java/com/threerings/presents/server/ClientFactory.java @@ -32,7 +32,7 @@ import com.threerings.presents.net.AuthRequest; public interface ClientFactory { /** The default client factory. */ - public static ClientFactory DEFAULT = new ClientFactory () { + public static ClientFactory DEFAULT = new ClientFactory() { public Class getClientClass (AuthRequest areq) { return PresentsClient.class; } diff --git a/src/java/com/threerings/presents/server/ClientManager.java b/src/java/com/threerings/presents/server/ClientManager.java index 7858ed483..77d6fce68 100644 --- a/src/java/com/threerings/presents/server/ClientManager.java +++ b/src/java/com/threerings/presents/server/ClientManager.java @@ -42,7 +42,10 @@ import com.threerings.presents.data.ClientObject; import com.threerings.presents.net.AuthRequest; import com.threerings.presents.net.AuthResponse; import com.threerings.presents.net.Credentials; -import com.threerings.presents.server.net.*; +import com.threerings.presents.server.net.AuthingConnection; +import com.threerings.presents.server.net.Connection; +import com.threerings.presents.server.net.ConnectionManager; +import com.threerings.presents.server.net.ConnectionObserver; import static com.threerings.presents.Log.log; @@ -323,8 +326,8 @@ public class ClientManager } /** - * Renames a currently connected client from oldname to newname - * + * Renames a currently connected client from oldname to newname. + * * @return true if the client was found and renamed. */ protected boolean renameClientObject (Name oldname, Name newname) @@ -548,16 +551,16 @@ public class ClientManager protected Injector _injector; /** A mapping from auth username to client instances. */ - protected Map _usermap = Maps.newHashMap(); + protected Map _usermap = Maps.newHashMap(); /** A mapping from connections to client instances. */ - protected Map _conmap = Maps.newHashMap(); + protected Map _conmap = Maps.newHashMap(); /** A mapping from usernames to client object instances. */ - protected Map _objmap = Maps.newHashMap(); + protected Map _objmap = Maps.newHashMap(); /** A mapping of pending client resolvers. */ - protected Map _penders = Maps.newHashMap(); + protected Map _penders = Maps.newHashMap(); /** Lets us know what sort of client classes to use. */ protected ClientFactory _factory = ClientFactory.DEFAULT;