Cleanup some unused stuff & mark some overrides.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5547 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -24,9 +24,9 @@ package com.threerings.crowd.client;
|
||||
import com.threerings.crowd.data.OccupantInfo;
|
||||
|
||||
/**
|
||||
* An entity that is interested in hearing about bodies that enter and
|
||||
* leave a location (as well as disconnect and reconnect) can implement
|
||||
* this interface and register itself with the {@link OccupantDirector}.
|
||||
* An entity that is interested in hearing about bodies that enter and leave a location (as well
|
||||
* as disconnect and reconnect) can implement this interface and register itself with the
|
||||
* {@link OccupantDirector}.
|
||||
*/
|
||||
public interface OccupantObserver
|
||||
{
|
||||
|
||||
@@ -212,7 +212,7 @@ public class BlockingCommunicator extends Communicator
|
||||
|
||||
// let the client know that things went south
|
||||
notifyClientObservers(new ObserverOps.Client(_client) {
|
||||
protected void notify (ClientObserver obs) {
|
||||
@Override protected void notify (ClientObserver obs) {
|
||||
obs.clientConnectionFailed(_client, ioe);
|
||||
}
|
||||
});
|
||||
@@ -268,7 +268,7 @@ public class BlockingCommunicator extends Communicator
|
||||
|
||||
// let the client observers know that we're logged off
|
||||
notifyClientObservers(new ObserverOps.Session(_client) {
|
||||
protected void notify (SessionObserver obs) {
|
||||
@Override protected void notify (SessionObserver obs) {
|
||||
obs.clientDidLogoff(_client);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -420,7 +420,7 @@ public class Client
|
||||
|
||||
// notify our observers immediately
|
||||
_observers.apply(new ObserverOps.Session(this) {
|
||||
protected void notify (SessionObserver obs) {
|
||||
@Override protected void notify (SessionObserver obs) {
|
||||
obs.clientWillLogon(_client);
|
||||
}
|
||||
});
|
||||
@@ -506,7 +506,7 @@ public class Client
|
||||
// if the request is abortable, let's run it past the observers before we act upon it
|
||||
final boolean[] rejected = new boolean[] { false };
|
||||
_observers.apply(new ObserverOps.Client(this) {
|
||||
protected void notify (ClientObserver obs) {
|
||||
@Override protected void notify (ClientObserver obs) {
|
||||
if (!obs.clientWillLogoff(_client)) {
|
||||
rejected[0] = true;
|
||||
}
|
||||
@@ -531,7 +531,7 @@ public class Client
|
||||
_standalone = true;
|
||||
// notify our observers immediately
|
||||
_observers.apply(new ObserverOps.Session(this) {
|
||||
protected void notify (SessionObserver obs) {
|
||||
@Override protected void notify (SessionObserver obs) {
|
||||
obs.clientWillLogon(_client);
|
||||
}
|
||||
});
|
||||
@@ -556,7 +556,7 @@ public class Client
|
||||
public void standaloneLogoff ()
|
||||
{
|
||||
notifyObservers(new ObserverOps.Session(this) {
|
||||
protected void notify (SessionObserver obs) {
|
||||
@Override protected void notify (SessionObserver obs) {
|
||||
obs.clientDidLogoff(_client);
|
||||
}
|
||||
});
|
||||
@@ -727,7 +727,7 @@ public class Client
|
||||
protected void reportLogonTribulations (final LogonException cause)
|
||||
{
|
||||
notifyObservers(new ObserverOps.Client(this) {
|
||||
protected void notify (ClientObserver obs) {
|
||||
@Override protected void notify (ClientObserver obs) {
|
||||
obs.clientFailedToLogon(_client, cause);
|
||||
}
|
||||
});
|
||||
@@ -744,7 +744,7 @@ public class Client
|
||||
|
||||
// let the client know that logon has now fully succeeded
|
||||
notifyObservers(new ObserverOps.Session(this) {
|
||||
protected void notify (SessionObserver obs) {
|
||||
@Override protected void notify (SessionObserver obs) {
|
||||
obs.clientDidLogon(_client);
|
||||
}
|
||||
});
|
||||
@@ -757,7 +757,7 @@ public class Client
|
||||
{
|
||||
// pass the buck onto the listeners
|
||||
notifyObservers(new ObserverOps.Client(this) {
|
||||
protected void notify (ClientObserver obs) {
|
||||
@Override protected void notify (ClientObserver obs) {
|
||||
obs.clientFailedToLogon(_client, cause);
|
||||
}
|
||||
});
|
||||
@@ -773,7 +773,7 @@ public class Client
|
||||
|
||||
// report to our observers
|
||||
notifyObservers(new ObserverOps.Session(this) {
|
||||
protected void notify (SessionObserver obs) {
|
||||
@Override protected void notify (SessionObserver obs) {
|
||||
obs.clientObjectDidChange(_client);
|
||||
}
|
||||
});
|
||||
@@ -826,7 +826,7 @@ public class Client
|
||||
// immediately try another logon (hopefully with something changed like the server
|
||||
// or port)
|
||||
notifyObservers(new ObserverOps.Client(Client.this) {
|
||||
protected void notify (ClientObserver obs) {
|
||||
@Override protected void notify (ClientObserver obs) {
|
||||
if (logonError != null) {
|
||||
obs.clientFailedToLogon(_client, logonError);
|
||||
} else {
|
||||
|
||||
@@ -226,8 +226,8 @@ public class DObject
|
||||
if (els != null) {
|
||||
_listeners = els;
|
||||
} else {
|
||||
log.warning("Refusing repeat listener registration [dobj=" + which() +
|
||||
", list=" + listener + "]", new Exception());
|
||||
log.warning("Refusing repeat listener registration",
|
||||
"dobj", which(), "list", listener, new Exception());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ import com.threerings.presents.peer.net.PeerBootstrapData;
|
||||
import com.threerings.presents.peer.server.persist.NodeRecord;
|
||||
import com.threerings.presents.server.PresentsDObjectMgr;
|
||||
import com.threerings.presents.server.net.ConnectionManager;
|
||||
import com.threerings.presents.server.net.ServerCommunicator;
|
||||
|
||||
import static com.threerings.presents.Log.log;
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ import com.samskivert.util.Histogram;
|
||||
import com.samskivert.util.IntMap;
|
||||
import com.samskivert.util.IntMaps;
|
||||
import com.samskivert.util.Interval;
|
||||
import com.samskivert.util.Invoker;
|
||||
import com.samskivert.util.Queue;
|
||||
import com.samskivert.util.RunQueue;
|
||||
import com.samskivert.util.StringUtil;
|
||||
|
||||
@@ -28,14 +28,11 @@ import java.security.NoSuchAlgorithmException;
|
||||
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.SelectionKey;
|
||||
import java.nio.channels.SocketChannel;
|
||||
|
||||
import com.samskivert.util.StringUtil;
|
||||
|
||||
import com.threerings.io.FramedInputStream;
|
||||
import com.threerings.io.FramingOutputStream;
|
||||
import com.threerings.io.ObjectInputStream;
|
||||
|
||||
@@ -61,8 +61,6 @@ import com.threerings.io.UnreliableObjectOutputStream;
|
||||
import com.threerings.presents.annotation.AuthInvoker;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.data.ConMgrStats;
|
||||
import com.threerings.presents.net.AuthRequest;
|
||||
import com.threerings.presents.net.AuthResponse;
|
||||
import com.threerings.presents.net.Message;
|
||||
import com.threerings.presents.server.Authenticator;
|
||||
import com.threerings.presents.server.ChainedAuthenticator;
|
||||
@@ -335,7 +333,6 @@ public class ConnectionManager extends LoopingThread
|
||||
protected void willStart ()
|
||||
{
|
||||
int successes = 0;
|
||||
IOException failure = null;
|
||||
for (int port : _ports) {
|
||||
try {
|
||||
// create a listening socket and add it to the select set
|
||||
@@ -350,7 +347,6 @@ public class ConnectionManager extends LoopingThread
|
||||
|
||||
} catch (IOException ioe) {
|
||||
log.warning("Failure listening to socket on port '" + port + "'.", ioe);
|
||||
failure = ioe;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ServerCommunicator extends Communicator
|
||||
|
||||
@Override public void networkFailure (final IOException ioe) {
|
||||
notifyClientObservers(new ObserverOps.Client(_client) {
|
||||
protected void notify (ClientObserver obs) {
|
||||
@Override protected void notify (ClientObserver obs) {
|
||||
obs.clientConnectionFailed(_client, ioe);
|
||||
}
|
||||
});
|
||||
@@ -186,7 +186,7 @@ public class ServerCommunicator extends Communicator
|
||||
if (_logonError == null) {
|
||||
// we were logged on successfully, so report didLogoff first
|
||||
notifyClientObservers(new ObserverOps.Session(_client) {
|
||||
protected void notify (SessionObserver obs) {
|
||||
@Override protected void notify (SessionObserver obs) {
|
||||
obs.clientDidLogoff(_client);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user