And finally, narya gets the imports/overrides/regen love.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5241 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Dave Hoover
2008-07-18 23:20:17 +00:00
parent e41dda3018
commit 6b1d65553f
129 changed files with 383 additions and 304 deletions
@@ -49,7 +49,7 @@ public class AsStringFieldEditor extends FieldEditor
_value.addFocusListener(this);
}
// documentation inherited
@Override
protected Object getDisplayValue ()
throws Exception
{
@@ -95,7 +95,7 @@ public class AsStringFieldEditor extends FieldEditor
}
}
// documentation inherited
@Override
protected void displayValue (Object value)
{
_value.setText(StringUtil.toString(value, "", ""));
@@ -59,14 +59,14 @@ public class BooleanFieldEditor extends FieldEditor
_value.addFocusListener(this);
}
// documentation inherited
@Override
protected Object getDisplayValue ()
throws Exception
{
return Boolean.valueOf(_value.isSelected());
}
// documentation inherited
@Override
protected void displayValue (Object value)
{
_value.setSelected(Boolean.TRUE.equals(value));
@@ -75,7 +75,7 @@ public class ConfigEditorPanel extends JPanel
service.getConfigInfo(_ctx.getClient(), this);
}
// documentation inherited
@Override
public void removeNotify ()
{
super.removeNotify();
@@ -44,14 +44,17 @@ public class ConfigObjectManager implements AdminService.ConfigInfoListener
_serverconfig = new HashMap<String, ConfigObject>();
_client = client;
_client.addClientObserver(new ClientAdapter() {
@Override
public void clientWillLogon (Client client) {
client.addServiceGroup(AdminCodes.ADMIN_GROUP);
}
@Override
public void clientDidLogon (Client client) {
_dobjmgr = _client.getDObjectManager();
_service = client.requireService(AdminService.class);
getConfigInfo();
}
@Override
public void clientDidLogoff (Client client) {
// Clean up our subscription to the server's configuration
for (int ii = 0; ii < _csubscribers.length; ii++) {
@@ -121,7 +121,7 @@ public class DSetEditor extends JPanel
return (DSet.Entry)_table.getSelectedObject();
}
// documentation inherited
@Override
public Dimension getPreferredSize ()
{
Dimension d = super.getPreferredSize();
@@ -129,7 +129,7 @@ public class DSetEditor extends JPanel
return d;
}
// documentation inherited
@Override
public void addNotify ()
{
super.addNotify();
@@ -140,7 +140,7 @@ public class DSetEditor extends JPanel
refreshData();
}
// documentation inherited
@Override
public void removeNotify ()
{
_setter.removeListener(this);
@@ -65,7 +65,7 @@ public abstract class FieldEditor extends JPanel
updateBorder(false);
}
// documentation inherited
@Override
public void addNotify ()
{
super.addNotify();
@@ -75,6 +75,7 @@ public abstract class FieldEditor extends JPanel
displayValue(getValue());
}
@Override
public void removeNotify ()
{
super.removeNotify();
@@ -72,7 +72,7 @@ public class ObjectEditorPanel extends ScrollablePanel
_safesub.subscribe(_ctx.getDObjectManager());
}
// documentation inherited from interface
@Override
public boolean getScrollableTracksViewportWidth ()
{
return true;
@@ -57,7 +57,7 @@ public class PulldownFieldEditor extends FieldEditor
value = val;
}
// documentation inherited
@Override
public String toString ()
{
return _name;
@@ -95,21 +95,21 @@ public class PulldownFieldEditor extends FieldEditor
addChoice(new Choice(name, choice));
}
// documentation inherited
@Override
public void addNotify ()
{
super.addNotify();
_value.addActionListener(this);
}
// documentation inherited
@Override
public void removeNotify ()
{
_value.removeActionListener(this);
super.removeNotify();
}
// documentation inherited
@Override
protected Object getDisplayValue ()
throws Exception
{
@@ -120,7 +120,7 @@ public class PulldownFieldEditor extends FieldEditor
return ((Choice)obj).value;
}
// documentation inherited
@Override
protected void displayValue (Object value)
{
for (int ii = _value.getItemCount() - 1; ii >= 0; ii--) {
@@ -140,6 +140,7 @@ public class DatabaseConfigRegistry extends ConfigRegistry
super.init();
}
@Override
protected boolean getValue (String field, boolean defval) {
String value = _data.get(field);
if (value != null) {
@@ -148,6 +149,7 @@ public class DatabaseConfigRegistry extends ConfigRegistry
return defval;
}
@Override
protected short getValue (String field, short defval) {
String value = _data.get(field);
try {
@@ -160,6 +162,7 @@ public class DatabaseConfigRegistry extends ConfigRegistry
return defval;
}
@Override
protected int getValue (String field, int defval) {
String value = _data.get(field);
try {
@@ -172,6 +175,7 @@ public class DatabaseConfigRegistry extends ConfigRegistry
return defval;
}
@Override
protected long getValue (String field, long defval) {
String value = _data.get(field);
try {
@@ -184,6 +188,7 @@ public class DatabaseConfigRegistry extends ConfigRegistry
return defval;
}
@Override
protected float getValue (String field, float defval) {
String value = _data.get(field);
try {
@@ -196,11 +201,13 @@ public class DatabaseConfigRegistry extends ConfigRegistry
return defval;
}
@Override
protected String getValue (String field, String defval) {
String value = _data.get(field);
return (value == null) ? defval : value;
}
@Override
protected int[] getValue (String field, int[] defval) {
String value = _data.get(field);
try {
@@ -216,6 +223,7 @@ public class DatabaseConfigRegistry extends ConfigRegistry
return defval;
}
@Override
protected float[] getValue (String field, float[] defval) {
String value = _data.get(field);
try {
@@ -231,6 +239,7 @@ public class DatabaseConfigRegistry extends ConfigRegistry
return defval;
}
@Override
protected long[] getValue (String field, long[] defval) {
String value = _data.get(field);
try {
@@ -246,6 +255,7 @@ public class DatabaseConfigRegistry extends ConfigRegistry
return defval;
}
@Override
protected String[] getValue (String field, String[] defval) {
String value = _data.get(field);
try {
@@ -258,33 +268,43 @@ public class DatabaseConfigRegistry extends ConfigRegistry
return defval;
}
@Override
protected void setValue (String field, boolean value) {
setAndFlush(field, String.valueOf(value));
}
@Override
protected void setValue (String field, short value) {
setAndFlush(field, String.valueOf(value));
}
@Override
protected void setValue (String field, int value) {
setAndFlush(field, String.valueOf(value));
}
@Override
protected void setValue (String field, long value) {
setAndFlush(field, String.valueOf(value));
}
@Override
protected void setValue (String field, float value) {
setAndFlush(field, String.valueOf(value));
}
@Override
protected void setValue (String field, String value) {
setAndFlush(field, value);
}
@Override
protected void setValue (String field, int[] value) {
setAndFlush(field, StringUtil.toString(value, "", ""));
}
@Override
protected void setValue (String field, float[] value) {
setAndFlush(field, StringUtil.toString(value, "", ""));
}
@Override
protected void setValue (String field, long[] value) {
setAndFlush(field, StringUtil.toString(value, "", ""));
}
@Override
protected void setValue (String field, String[] value) {
setAndFlush(field, StringUtil.joinEscaped(value));
}
@@ -293,6 +313,7 @@ public class DatabaseConfigRegistry extends ConfigRegistry
_data.put(field, value);
String iname = "updateConfig(" + _path + ", " + field + ", value=" + value + ")";
_invoker.postUnit(new WriteOnlyUnit(iname) {
@Override
public void invokePersist () throws Exception {
_repo.updateConfig(_node, _path, field, value);
}
@@ -51,64 +51,84 @@ public class PrefsConfigRegistry extends ConfigRegistry
this.config = new PrefsConfig(path);
}
@Override
protected boolean getValue (String field, boolean defval) {
return config.getValue(field, defval);
}
@Override
protected short getValue (String field, short defval) {
return (short)config.getValue(field, defval);
}
@Override
protected int getValue (String field, int defval) {
return config.getValue(field, defval);
}
@Override
protected long getValue (String field, long defval) {
return config.getValue(field, defval);
}
@Override
protected float getValue (String field, float defval) {
return config.getValue(field, defval);
}
@Override
protected String getValue (String field, String defval) {
return config.getValue(field, defval);
}
@Override
protected int[] getValue (String field, int[] defval) {
return config.getValue(field, defval);
}
@Override
protected float[] getValue (String field, float[] defval) {
return config.getValue(field, defval);
}
@Override
protected long[] getValue (String field, long[] defval) {
return config.getValue(field, defval);
}
@Override
protected String[] getValue (String field, String[] defval) {
return config.getValue(field, defval);
}
@Override
protected void setValue (String field, boolean value) {
config.setValue(field, value);
}
@Override
protected void setValue (String field, short value) {
config.setValue(field, value);
}
@Override
protected void setValue (String field, int value) {
config.setValue(field, value);
}
@Override
protected void setValue (String field, long value) {
config.setValue(field, value);
}
@Override
protected void setValue (String field, float value) {
config.setValue(field, value);
}
@Override
protected void setValue (String field, String value) {
config.setValue(field, value);
}
@Override
protected void setValue (String field, int[] value) {
config.setValue(field, value);
}
@Override
protected void setValue (String field, float[] value) {
config.setValue(field, value);
}
@Override
protected void setValue (String field, long[] value) {
config.setValue(field, value);
}
@Override
protected void setValue (String field, String[] value) {
config.setValue(field, value);
}
@@ -31,6 +31,7 @@ public class ConfigDatum
public String field;
public String value;
@Override
public String toString () {
return node + "." + object + "." + field + "=" + value + "]";
}
@@ -197,6 +197,7 @@ public class BureauRegistry
ProcessLogger.copyMergedOutput(log, bureauId, process);
}
@Override
public String toString () {
return "DefaultLauncher for " + cmdGenerator;
}
@@ -586,6 +587,7 @@ public class BureauRegistry
_bureau = bureau;
}
@Override
public boolean invoke ()
{
try {
@@ -597,6 +599,7 @@ public class BureauRegistry
return true;
}
@Override
public void handleResult ()
{
_bureau.launched = true;
@@ -677,6 +680,7 @@ public class BureauRegistry
// The states of the various agents allocated to this bureau
Map<AgentObject, Integer> agentStates = Maps.newHashMap();
@Override
public String toString ()
{
StringBuilder builder = new StringBuilder();
@@ -653,7 +653,7 @@ public class ChatDirector extends BasicDirector
}
}
// documentation inherited
@Override
public void clientDidLogon (Client client)
{
super.clientDidLogon(client);
@@ -662,7 +662,7 @@ public class ChatDirector extends BasicDirector
addAuxiliarySource(_clobj = client.getClientObject(), USER_CHAT_TYPE);
}
// documentation inherited
@Override
public void clientObjectDidChange (Client client)
{
super.clientObjectDidChange(client);
@@ -674,7 +674,7 @@ public class ChatDirector extends BasicDirector
clearDisplays();
}
// documentation inherited
@Override
public void clientDidLogoff (Client client)
{
super.clientDidLogoff(client);
@@ -1038,13 +1038,13 @@ public class ChatDirector extends BasicDirector
return (type == null) ? PLACE_CHAT_TYPE : type;
}
@Override // from BasicDirector
@Override
protected void registerServices (Client client)
{
client.addServiceGroup(CrowdCodes.CROWD_GROUP);
}
@Override // from BasicDirector
@Override
protected void fetchServices (Client client)
{
// get a handle on our chat service
@@ -1110,6 +1110,7 @@ public class ChatDirector extends BasicDirector
/** Implements <code>/help</code>. */
protected class HelpHandler extends CommandHandler
{
@Override
public String handleCommand (SpeakService speakSvc, String command,
String args, String[] history)
{
@@ -1161,6 +1162,7 @@ public class ChatDirector extends BasicDirector
/** Implements <code>/clear</code>. */
protected class ClearHandler extends CommandHandler
{
@Override
public String handleCommand (SpeakService speakSvc, String command,
String args, String[] history)
{
@@ -1172,6 +1174,7 @@ public class ChatDirector extends BasicDirector
/** Implements <code>/speak</code>. */
protected class SpeakHandler extends CommandHandler
{
@Override
public String handleCommand (SpeakService speakSvc, String command,
String args, String[] history)
{
@@ -1189,6 +1192,7 @@ public class ChatDirector extends BasicDirector
/** Implements <code>/emote</code>. */
protected class EmoteHandler extends CommandHandler
{
@Override
public String handleCommand (SpeakService speakSvc, String command,
String args, String[] history)
{
@@ -1204,6 +1208,7 @@ public class ChatDirector extends BasicDirector
/** Implements <code>/think</code>. */
protected class ThinkHandler extends CommandHandler
{
@Override
public String handleCommand (SpeakService speakSvc, String command,
String args, String[] history)
{
@@ -1219,6 +1224,7 @@ public class ChatDirector extends BasicDirector
/** Implements <code>/tell</code>. */
protected class TellHandler extends CommandHandler
{
@Override
public String handleCommand (SpeakService speakSvc, final String command,
String args, String[] history)
{
@@ -1339,6 +1345,7 @@ public class ChatDirector extends BasicDirector
/** Implements <code>/broadcast</code>. */
protected class BroadcastHandler extends CommandHandler
{
@Override
public String handleCommand (SpeakService speakSvc, String command,
String args, String[] history)
{
@@ -1362,6 +1369,7 @@ public class ChatDirector extends BasicDirector
return ChatCodes.SUCCESS;
}
@Override
public boolean checkAccess (BodyObject user)
{
return user.checkAccess(ChatCodes.BROADCAST_ACCESS) == null;
@@ -82,9 +82,7 @@ public abstract class ChatMessage
return null;
}
/**
* Generates a string representation of this instance.
*/
@Override
public String toString ()
{
return StringUtil.shortClassName(this) + StringUtil.fieldsToString(this);
@@ -393,7 +393,7 @@ public class LocationDirector extends BasicDirector
}
}
// documentation inherited from interface
@Override
public void clientDidLogon (Client client)
{
super.clientDidLogon(client);
@@ -412,7 +412,7 @@ public class LocationDirector extends BasicDirector
client.getDObjectManager().subscribeToObject(cloid, sub);
}
// documentation inherited from interface
@Override
public void clientDidLogoff (Client client)
{
super.clientDidLogoff(client);
@@ -432,13 +432,13 @@ public class LocationDirector extends BasicDirector
_lservice = null;
}
@Override // from BasicDirector
@Override
protected void registerServices (Client client)
{
client.addServiceGroup(CrowdCodes.CROWD_GROUP);
}
// documentation inherited
@Override
protected void fetchServices (Client client)
{
// obtain our service handle
@@ -107,7 +107,7 @@ public class OccupantDirector extends BasicDirector
return (_place == null) ? null : _place.getOccupantInfo(username);
}
// documentation inherited from interface
@Override
public void clientDidLogoff (Client client)
{
// clear things out
@@ -80,6 +80,7 @@ public abstract class PlaceController extends Controller
// initialize our delegates
applyToDelegates(new DelegateOp(PlaceControllerDelegate.class) {
@Override
public void apply (PlaceControllerDelegate delegate) {
delegate.init(_ctx, _config);
}
@@ -162,6 +163,7 @@ public abstract class PlaceController extends Controller
// let our delegates know what's up
applyToDelegates(new DelegateOp(PlaceControllerDelegate.class) {
@Override
public void apply (PlaceControllerDelegate delegate) {
delegate.willEnterPlace(plobj);
}
@@ -183,6 +185,7 @@ public abstract class PlaceController extends Controller
{
// let our delegates know what's up
applyToDelegates(new DelegateOp(PlaceControllerDelegate.class) {
@Override
public void apply (PlaceControllerDelegate delegate) {
delegate.mayLeavePlace(plobj);
}
@@ -200,6 +203,7 @@ public abstract class PlaceController extends Controller
{
// let our delegates know what's up
applyToDelegates(new DelegateOp(PlaceControllerDelegate.class) {
@Override
public void apply (PlaceControllerDelegate delegate) {
delegate.didLeavePlace(plobj);
}
@@ -220,12 +224,14 @@ public abstract class PlaceController extends Controller
* should be sure to call <code>super.handleAction</code> for events
* they don't specifically handle.
*/
@Override
public boolean handleAction (final ActionEvent action)
{
final boolean[] handled = new boolean[1];
// let our delegates have a crack at the action
applyToDelegates(new DelegateOp(PlaceControllerDelegate.class) {
@Override
public void apply (PlaceControllerDelegate delegate) {
// we take advantage of short-circuiting here
handled[0] = handled[0] || delegate.handleAction(action);
@@ -140,7 +140,7 @@ public class BodyObject extends ClientObject
op.apply(getOid());
}
// documentation inherited
@Override
public String who ()
{
StringBuilder buf = new StringBuilder(username.toString());
@@ -92,9 +92,7 @@ public class OccupantInfo extends SimpleStreamableObject
return bodyOid;
}
/**
* Generates a cloned copy of this instance.
*/
@Override
public Object clone ()
{
try {
@@ -89,7 +89,7 @@ public abstract class PlaceConfig extends SimpleStreamableObject
*/
public abstract String getManagerClassName ();
// documentation inherited
@Override
@ActionScript(name="toStringBuilder")
protected void toString (StringBuilder buf)
{
@@ -34,7 +34,7 @@ import com.threerings.crowd.data.OccupantInfo;
*/
public class CrowdClient extends PresentsClient
{
// documentation inherited
@Override
protected void sessionConnectionClosed ()
{
super.sessionConnectionClosed();
@@ -46,7 +46,7 @@ public class CrowdClient extends PresentsClient
}
}
// documentation inherited
@Override
protected void sessionWillResume ()
{
super.sessionWillResume();
@@ -56,7 +56,7 @@ public class CrowdClient extends PresentsClient
_bodyman.updateOccupantStatus(bobj, bobj.location, OccupantInfo.ACTIVE);
}
// documentation inherited
@Override
protected void sessionDidEnd ()
{
super.sessionDidEnd();
@@ -25,7 +25,6 @@ import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.Injector;
import com.google.inject.Singleton;
import com.threerings.util.Name;
import com.threerings.presents.net.AuthRequest;
@@ -33,7 +32,6 @@ import com.threerings.presents.server.ClientFactory;
import com.threerings.presents.server.ClientResolver;
import com.threerings.presents.server.PresentsClient;
import com.threerings.presents.server.PresentsServer;
import com.threerings.crowd.chat.server.ChatProvider;
import static com.threerings.crowd.Log.log;
@@ -56,6 +54,7 @@ public class CrowdServer extends PresentsServer
/**
* Initializes all of the server services and prepares for operation.
*/
@Override
public void init (Injector injector)
throws Exception
{
@@ -193,6 +193,7 @@ public class PlaceManager
// initialize our delegates
applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) {
@Override
public void apply (PlaceManagerDelegate delegate) {
delegate.init(PlaceManager.this, _omgr, _invmgr);
}
@@ -442,6 +443,7 @@ public class PlaceManager
*
* @see #toString(StringBuilder)
*/
@Override
public String toString ()
{
StringBuilder buf = new StringBuilder();
@@ -483,6 +485,7 @@ public class PlaceManager
{
// initialize our delegates
applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) {
@Override
public void apply (PlaceManagerDelegate delegate) {
delegate.didInit(_config);
}
@@ -524,6 +527,7 @@ public class PlaceManager
{
// let our delegates know that we've started up
applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) {
@Override
public void apply (PlaceManagerDelegate delegate) {
delegate.didStartup(_plobj);
}
@@ -543,6 +547,7 @@ public class PlaceManager
// let our delegates know that we've shut down
applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) {
@Override
public void apply (PlaceManagerDelegate delegate) {
delegate.didShutdown();
}
@@ -568,6 +573,7 @@ public class PlaceManager
// let our delegates know what's up
applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) {
@Override
public void apply (PlaceManagerDelegate delegate) {
delegate.bodyEntered(bodyOid);
}
@@ -596,6 +602,7 @@ public class PlaceManager
// let our delegates know what's up
applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) {
@Override
public void apply (PlaceManagerDelegate delegate) {
delegate.bodyLeft(bodyOid);
}
@@ -622,6 +629,7 @@ public class PlaceManager
{
// let our delegates know what's up
applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) {
@Override
public void apply (PlaceManagerDelegate delegate) {
delegate.bodyUpdated(info);
}
@@ -637,6 +645,7 @@ public class PlaceManager
{
// let our delegates know what's up
applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) {
@Override
public void apply (PlaceManagerDelegate delegate) {
delegate.placeBecameEmpty();
}
@@ -656,6 +665,7 @@ public class PlaceManager
long idlePeriod = idleUnloadPeriod();
if (idlePeriod > 0L && _shutdownInterval == null) {
_shutdownInterval = new Interval(_omgr) {
@Override
public void expired () {
log.debug("Unloading idle place '" + where () + "'.");
shutdown();
@@ -698,6 +708,7 @@ public class PlaceManager
/** Listens for occupant updates. */
protected SetAdapter _bodyUpdater = new SetAdapter() {
@Override
public void entryUpdated (EntryUpdatedEvent event) {
if (event.getName().equals(PlaceObject.OCCUPANT_INFO)) {
bodyUpdated((OccupantInfo)event.getEntry());
@@ -36,7 +36,6 @@ import com.threerings.presents.server.InvocationException;
import com.threerings.presents.server.InvocationManager;
import com.threerings.presents.server.ShutdownManager;
import com.threerings.crowd.data.Place;
import com.threerings.crowd.data.PlaceConfig;
import com.threerings.crowd.data.PlaceObject;
+39 -38
View File
@@ -85,14 +85,14 @@ public class BasicStreamers
/** Streams {@link Boolean} instances. */
public static class BooleanStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return Boolean.valueOf(in.readBoolean());
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -103,14 +103,14 @@ public class BasicStreamers
/** Streams {@link Byte} instances. */
public static class ByteStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return Byte.valueOf(in.readByte());
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -121,14 +121,14 @@ public class BasicStreamers
/** Streams {@link Short} instances. */
public static class ShortStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return Short.valueOf(in.readShort());
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -139,13 +139,13 @@ public class BasicStreamers
/** Streams {@link Character} instances. */
public static class CharacterStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)throws IOException
{
return Character.valueOf(in.readChar());
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -156,14 +156,14 @@ public class BasicStreamers
/** Streams {@link Integer} instances. */
public static class IntegerStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return Integer.valueOf(in.readInt());
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -174,14 +174,14 @@ public class BasicStreamers
/** Streams {@link Long} instances. */
public static class LongStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return Long.valueOf(in.readLong());
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -192,14 +192,14 @@ public class BasicStreamers
/** Streams {@link Float} instances. */
public static class FloatStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return Float.valueOf(in.readFloat());
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -210,14 +210,14 @@ public class BasicStreamers
/** Streams {@link Double} instances. */
public static class DoubleStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return Double.valueOf(in.readDouble());
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -228,14 +228,14 @@ public class BasicStreamers
/** Streams {@link String} instances. */
public static class StringStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return in.readUTF();
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -246,14 +246,14 @@ public class BasicStreamers
/** Streams arrays of booleans. */
public static class BooleanArrayStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return readBooleanArray(in);
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -264,14 +264,14 @@ public class BasicStreamers
/** Streams arrays of bytes. */
public static class ByteArrayStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return readByteArray(in);
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -282,14 +282,14 @@ public class BasicStreamers
/** Streams arrays of shorts. */
public static class ShortArrayStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return readShortArray(in);
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -300,14 +300,14 @@ public class BasicStreamers
/** Streams arrays of chars. */
public static class CharArrayStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return readCharArray(in);
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -318,14 +318,14 @@ public class BasicStreamers
/** Streams arrays of ints. */
public static class IntArrayStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return readIntArray(in);
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -336,14 +336,14 @@ public class BasicStreamers
/** Streams arrays of longs. */
public static class LongArrayStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return readLongArray(in);
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -354,14 +354,14 @@ public class BasicStreamers
/** Streams arrays of floats. */
public static class FloatArrayStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return readFloatArray(in);
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -372,14 +372,14 @@ public class BasicStreamers
/** Streams arrays of doubles. */
public static class DoubleArrayStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException
{
return readDoubleArray(in);
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -390,14 +390,14 @@ public class BasicStreamers
/** Streams arrays of Object instances. */
public static class ObjectArrayStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException, ClassNotFoundException
{
return readObjectArray(in);
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -408,14 +408,14 @@ public class BasicStreamers
/** Streams {@link List} instances. */
public static class ListStreamer extends BasicStreamer
{
// documentation inherited
@Override
public Object createObject (ObjectInputStream in)
throws IOException, ClassNotFoundException
{
return readList(in);
}
// documentation inherited
@Override
public void writeObject (Object object, ObjectOutputStream out, boolean useWriter)
throws IOException
{
@@ -426,6 +426,7 @@ public class BasicStreamers
/** Streams {@link String} instances. */
public static class BasicStreamer extends Streamer
{
@Override
public void readObject (Object object, ObjectInputStream in, boolean useReader)
throws IOException, ClassNotFoundException
{
@@ -38,6 +38,7 @@ class ClassMapping
this.streamer = streamer;
}
@Override
public String toString ()
{
return "[code=" + code + ", class=" + sclass.getName() + "]";
@@ -141,7 +141,7 @@ public abstract class FieldMarshaller
_streamer = streamer;
}
// documentation inherited
@Override
public void readField (Field field, Object target, ObjectInputStream in)
throws Exception
{
@@ -154,7 +154,7 @@ public abstract class FieldMarshaller
}
}
// documentation inherited
@Override
public void writeField (Field field, Object source, ObjectOutputStream out)
throws Exception
{
@@ -167,6 +167,7 @@ public abstract class FieldMarshaller
}
}
@Override
public String toString ()
{
return "StreamerMarshaller:" + _streamer.toString();
@@ -187,14 +188,14 @@ public abstract class FieldMarshaller
_writer = writer;
}
// documentation inherited
@Override
public void readField (Field field, Object target, ObjectInputStream in)
throws Exception
{
_reader.invoke(target, in);
}
// documentation inherited
@Override
public void writeField (Field field, Object source, ObjectOutputStream out)
throws Exception
{
@@ -215,10 +216,12 @@ public abstract class FieldMarshaller
// create a generic marshaller for streamable instances
FieldMarshaller gmarsh = new FieldMarshaller() {
@Override
public void readField (Field field, Object target, ObjectInputStream in)
throws Exception {
field.set(target, in.readObject());
}
@Override
public void writeField (Field field, Object source, ObjectOutputStream out)
throws Exception {
out.writeObject(field.get(source));
@@ -234,90 +237,108 @@ public abstract class FieldMarshaller
// create marshallers for the primitive types
_marshallers.put(Boolean.TYPE, new FieldMarshaller() {
@Override
public void readField (Field field, Object target, ObjectInputStream in)
throws Exception {
field.setBoolean(target, in.readBoolean());
}
@Override
public void writeField (Field field, Object source, ObjectOutputStream out)
throws Exception {
out.writeBoolean(field.getBoolean(source));
}
});
_marshallers.put(Byte.TYPE, new FieldMarshaller() {
@Override
public void readField (Field field, Object target, ObjectInputStream in)
throws Exception {
field.setByte(target, in.readByte());
}
@Override
public void writeField (Field field, Object source, ObjectOutputStream out)
throws Exception {
out.writeByte(field.getByte(source));
}
});
_marshallers.put(Character.TYPE, new FieldMarshaller() {
@Override
public void readField (Field field, Object target, ObjectInputStream in)
throws Exception {
field.setChar(target, in.readChar());
}
@Override
public void writeField (Field field, Object source, ObjectOutputStream out)
throws Exception {
out.writeChar(field.getChar(source));
}
});
_marshallers.put(Short.TYPE, new FieldMarshaller() {
@Override
public void readField (Field field, Object target, ObjectInputStream in)
throws Exception {
field.setShort(target, in.readShort());
}
@Override
public void writeField (Field field, Object source, ObjectOutputStream out)
throws Exception {
out.writeShort(field.getShort(source));
}
});
_marshallers.put(Integer.TYPE, new FieldMarshaller() {
@Override
public void readField (Field field, Object target, ObjectInputStream in)
throws Exception {
field.setInt(target, in.readInt());
}
@Override
public void writeField (Field field, Object source, ObjectOutputStream out)
throws Exception {
out.writeInt(field.getInt(source));
}
});
_marshallers.put(Long.TYPE, new FieldMarshaller() {
@Override
public void readField (Field field, Object target, ObjectInputStream in)
throws Exception {
field.setLong(target, in.readLong());
}
@Override
public void writeField (Field field, Object source, ObjectOutputStream out)
throws Exception {
out.writeLong(field.getLong(source));
}
});
_marshallers.put(Float.TYPE, new FieldMarshaller() {
@Override
public void readField (Field field, Object target, ObjectInputStream in)
throws Exception {
field.setFloat(target, in.readFloat());
}
@Override
public void writeField (Field field, Object source, ObjectOutputStream out)
throws Exception {
out.writeFloat(field.getFloat(source));
}
});
_marshallers.put(Double.TYPE, new FieldMarshaller() {
@Override
public void readField (Field field, Object target, ObjectInputStream in)
throws Exception {
field.setDouble(target, in.readDouble());
}
@Override
public void writeField (Field field, Object source, ObjectOutputStream out)
throws Exception {
out.writeDouble(field.getDouble(source));
}
});
_marshallers.put(Date.class, new FieldMarshaller() {
@Override
public void readField (Field field, Object target, ObjectInputStream in)
throws Exception {
field.set(target, new Date(in.readLong()));
}
@Override
public void writeField (Field field, Object source, ObjectOutputStream out)
throws Exception {
out.writeLong(((Date)field.get(source)).getTime());
@@ -193,6 +193,7 @@ public class FramedInputStream extends InputStream
* @return the next byte of data, or <code>-1</code> if the end of the
* stream has been reached.
*/
@Override
public int read ()
{
return (_buffer.remaining() > 0) ? (_buffer.get() & 0xFF) : -1;
@@ -221,6 +222,7 @@ public class FramedInputStream extends InputStream
* <code>-1</code> if there is no more data because the end of the
* stream has been reached.
*/
@Override
public int read (byte[] b, int off, int len)
{
// if they want no bytes, we give them no bytes; this is
@@ -252,6 +254,7 @@ public class FramedInputStream extends InputStream
*
* @return the actual number of bytes skipped.
*/
@Override
public long skip (long n)
{
throw new UnsupportedOperationException();
@@ -264,6 +267,7 @@ public class FramedInputStream extends InputStream
* @return the number of bytes remaining to be read from the buffered
* frame.
*/
@Override
public int available ()
{
return _buffer.remaining();
@@ -273,6 +277,7 @@ public class FramedInputStream extends InputStream
* Always returns false as framed input streams do not support
* marking.
*/
@Override
public boolean markSupported ()
{
return false;
@@ -281,6 +286,7 @@ public class FramedInputStream extends InputStream
/**
* Does nothing, as marking is not supported.
*/
@Override
public void mark (int readAheadLimit)
{
// not supported; do nothing
@@ -289,6 +295,7 @@ public class FramedInputStream extends InputStream
/**
* Resets the buffer to the beginning of the buffered frames.
*/
@Override
public void reset ()
{
// position our buffer at the beginning of the frame data
@@ -230,9 +230,7 @@ public class ObjectInputStream extends DataInputStream
_streamer.readObject(_current, this, false);
}
/**
* Generates a string representation of this instance.
*/
@Override
public String toString ()
{
return "[hash=" + hashCode() + ", mappings=" + _classmap.size() +
@@ -31,9 +31,7 @@ import com.threerings.util.ActionScript;
*/
public class SimpleStreamableObject implements Streamable
{
/**
* Generates a string representation of this instance.
*/
@Override
public String toString ()
{
StringBuilder buf = new StringBuilder("[");
+1 -3
View File
@@ -391,9 +391,7 @@ public class Streamer
}
}
/**
* Generates a string representation of this instance.
*/
@Override
public String toString ()
{
return (_target == null) ? getClass().getName() :
@@ -33,9 +33,7 @@ import com.threerings.util.TrackedObject;
public class TrackedStreamableObject extends TrackedObject
implements Streamable
{
/**
* Generates a string representation of this instance.
*/
@Override
public String toString ()
{
StringBuilder buf = new StringBuilder("[");
@@ -540,6 +540,7 @@ public class BlockingCommunicator extends Communicator
super("BlockingCommunicator_Reader");
}
@Override
protected void willStart ()
{
// first we connect and authenticate with the server
@@ -609,6 +610,7 @@ public class BlockingCommunicator extends Communicator
// now that we're authenticated, we manage the reading half of things by continuously
// reading messages from the socket and processing them
@Override
protected void iterate ()
{
DownstreamMessage msg = null;
@@ -642,17 +644,20 @@ public class BlockingCommunicator extends Communicator
}
}
@Override
protected void handleIterateFailure (Exception e)
{
log.warning("Uncaught exception it reader thread.", e);
}
@Override
protected void didShutdown ()
{
// let the communicator know when we finally go away
readerDidExit();
}
@Override
protected void kick ()
{
// we want to interrupt the reader thread as it may be blocked listening to the socket;
@@ -677,6 +682,7 @@ public class BlockingCommunicator extends Communicator
super("BlockingCommunicator_Writer");
}
@Override
protected void iterate ()
{
// fetch the next message from the queue
@@ -700,16 +706,19 @@ public class BlockingCommunicator extends Communicator
}
}
@Override
protected void handleIterateFailure (Exception e)
{
log.warning("Uncaught exception it writer thread.", e);
}
@Override
protected void didShutdown ()
{
writerDidExit();
}
@Override
protected void kick ()
{
// post a bogus message to the outgoing queue to ensure that the writer thread notices
@@ -728,6 +737,7 @@ public class BlockingCommunicator extends Communicator
super("BlockingCommunicator_DatagramReader");
}
@Override
protected void willStart ()
{
try {
@@ -823,6 +833,7 @@ public class BlockingCommunicator extends Communicator
return false;
}
@Override
protected void iterate ()
{
DownstreamMessage msg = null;
@@ -849,16 +860,19 @@ public class BlockingCommunicator extends Communicator
}
}
@Override
protected void handleIterateFailure (Exception e)
{
log.warning("Uncaught exception in datagram reader thread.", e);
}
@Override
protected void didShutdown ()
{
datagramReaderDidExit();
}
@Override
protected void kick ()
{
// if we have a selector, wake it up
@@ -878,6 +892,7 @@ public class BlockingCommunicator extends Communicator
super("BlockingCommunicator_DatagramWriter");
}
@Override
protected void iterate ()
{
// fetch the next message from the queue
@@ -898,16 +913,19 @@ public class BlockingCommunicator extends Communicator
}
}
@Override
protected void handleIterateFailure (Exception e)
{
log.warning("Uncaught exception in datagram writer thread.", e);
}
@Override
protected void didShutdown ()
{
datagramWriterDidExit();
}
@Override
protected void kick ()
{
// post a bogus message to the outgoing queue to ensure that the writer thread notices
@@ -425,9 +425,11 @@ public class Client
// appropriate
if (_tickInterval == null) {
_tickInterval = new Interval(_runQueue) {
@Override
public void expired () {
tick();
}
@Override
public String toString () {
return "Client.tickInterval";
}
@@ -897,6 +899,7 @@ public class Client
}
}
@Override
public void clientDidClear (Client client)
{
// configure the client to point to the new server and logon
@@ -910,6 +913,7 @@ public class Client
}
}
@Override
public void clientDidLogon (Client client)
{
removeClientObserver(this);
@@ -918,6 +922,7 @@ public class Client
}
}
@Override
public void clientFailedToLogon (Client client, Exception cause)
{
removeClientObserver(this);
@@ -144,6 +144,7 @@ public class ClientCommunicator extends BlockingCommunicator
_nextPort = nextPort;
}
@Override
public void expired () {
if (clearPPI(false)) {
setPrefPort(_key, _thisPort);
@@ -66,6 +66,7 @@ public class ClientDObjectMgr
// register a flush interval
new Interval(client.getRunQueue()) {
@Override
public void expired () {
flushObjects();
}
@@ -440,6 +441,7 @@ public class ClientDObjectMgr
this.subscribe = subscribe;
}
@Override
public String toString ()
{
return StringUtil.fieldsToString(this);
@@ -79,7 +79,7 @@ public interface InvocationReceiver
return receiverCode;
}
/** Generates a string representation of this instance. */
@Override
public String toString ()
{
return "[" + receiverCode + " => " + receiverId + "]";
@@ -26,8 +26,6 @@ import com.samskivert.util.StringUtil;
import com.threerings.io.Streamable;
import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService.ConfirmListener;
import com.threerings.presents.client.InvocationService.ResultListener;
import com.threerings.presents.client.InvocationService;
import com.threerings.presents.dobj.DObjectManager;
@@ -116,16 +114,14 @@ public class InvocationMarshaller
}
}
/**
* Generates a string representation of this instance.
*/
@Override
public String toString ()
{
return "[callerOid=" + callerOid + ", reqId=" + requestId +
", type=" + getClass().getName() + "]";
}
// documentation inherited
@Override
protected void finalize ()
throws Throwable
{
@@ -156,7 +152,7 @@ public class InvocationMarshaller
callerOid, requestId, REQUEST_PROCESSED, null, transport));
}
// documentation inherited
@Override
public void dispatchResponse (int methodId, Object[] args)
{
switch (methodId) {
@@ -187,7 +183,7 @@ public class InvocationMarshaller
callerOid, requestId, REQUEST_PROCESSED, new Object[] { result }, transport));
}
// documentation inherited
@Override
public void dispatchResponse (int methodId, Object[] args)
{
switch (methodId) {
@@ -240,9 +236,7 @@ public class InvocationMarshaller
}
}
/**
* Generates a string representation of this instance.
*/
@Override
public String toString ()
{
return "[invOid=" + _invOid + ", code=" + _invCode + ", type=" + getClass().getName() + "]";
@@ -114,7 +114,7 @@ public class AttributeChangedEvent extends NamedEvent
return ((Double)_value).doubleValue();
}
@Override // from DEvent
@Override
public boolean alreadyApplied ()
{
// if we have an old value, that means we're running on the master server and we have
@@ -122,7 +122,7 @@ public class AttributeChangedEvent extends NamedEvent
return (_oldValue != UNSET_OLD_VALUE);
}
@Override // from DEvent
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -184,7 +184,7 @@ public class AttributeChangedEvent extends NamedEvent
_oldValue = oldValue;
}
// documentation inherited
@Override
protected void notifyListener (Object listener)
{
if (listener instanceof AttributeChangeListener) {
@@ -192,7 +192,7 @@ public class AttributeChangedEvent extends NamedEvent
}
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
buf.append("CHANGE:");
@@ -122,7 +122,7 @@ public class CompoundEvent extends DEvent
_events.clear();
}
@Override // from DEvent
@Override
public void setSourceOid (int sourceOid)
{
super.setSourceOid(sourceOid);
@@ -134,7 +134,7 @@ public class CompoundEvent extends DEvent
}
}
@Override // from DEvent
@Override
public void setTargetOid (int targetOid)
{
super.setTargetOid(targetOid);
@@ -146,7 +146,7 @@ public class CompoundEvent extends DEvent
}
}
@Override // from DEvent
@Override
public void setTransport (Transport transport)
{
super.setTransport(transport);
@@ -155,7 +155,7 @@ public class CompoundEvent extends DEvent
}
}
@Override // from DEvent
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -174,7 +174,7 @@ public class CompoundEvent extends DEvent
}
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
buf.append("COMPOUND:");
@@ -162,9 +162,7 @@ public abstract class DEvent implements Streamable
// the default is to do nothing
}
/**
* Constructs and returns a string representation of this event.
*/
@Override
public String toString ()
{
StringBuilder buf = new StringBuilder();
@@ -409,14 +409,13 @@ public class DSet<E extends DSet.Entry>
/**
* Generates a shallow copy of this object.
*/
@Override
public Object clone ()
{
return typedClone();
}
/**
* Generates a string representation of this set instance.
*/
@Override
public String toString ()
{
StringBuilder buf = new StringBuilder("(");
@@ -153,13 +153,13 @@ public class ElementUpdatedEvent extends NamedEvent
return ((Double)_value).doubleValue();
}
@Override // from DEvent
@Override
public boolean alreadyApplied ()
{
return (_oldValue != UNSET_OLD_VALUE);
}
@Override // from DEvent
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -191,7 +191,7 @@ public class ElementUpdatedEvent extends NamedEvent
return true;
}
// documentation inherited
@Override
protected void notifyListener (Object listener)
{
if (listener instanceof ElementUpdateListener) {
@@ -199,7 +199,7 @@ public class ElementUpdatedEvent extends NamedEvent
}
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
buf.append("UPDATE:");
@@ -71,13 +71,13 @@ public class EntryAddedEvent<T extends DSet.Entry> extends NamedEvent
return _entry;
}
@Override // from DEvent
@Override
public boolean alreadyApplied ()
{
return _alreadyApplied;
}
@Override // from DEvent
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -89,7 +89,7 @@ public class EntryAddedEvent<T extends DSet.Entry> extends NamedEvent
return true;
}
// documentation inherited
@Override
protected void notifyListener (Object listener)
{
if (listener instanceof SetListener) {
@@ -98,7 +98,7 @@ public class EntryAddedEvent<T extends DSet.Entry> extends NamedEvent
}
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
buf.append("ELADD:");
@@ -72,13 +72,13 @@ public class EntryRemovedEvent<T extends DSet.Entry> extends NamedEvent
return _oldEntry;
}
@Override // from DEvent
@Override
public boolean alreadyApplied ()
{
return (_oldEntry != UNSET_OLD_ENTRY);
}
@Override // from DEvent
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -95,7 +95,7 @@ public class EntryRemovedEvent<T extends DSet.Entry> extends NamedEvent
return true;
}
// documentation inherited
@Override
protected void notifyListener (Object listener)
{
if (listener instanceof SetListener) {
@@ -104,7 +104,7 @@ public class EntryRemovedEvent<T extends DSet.Entry> extends NamedEvent
}
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
buf.append("ELREM:");
@@ -90,13 +90,13 @@ public class EntryUpdatedEvent<T extends DSet.Entry> extends NamedEvent
return _oldEntry;
}
@Override // from DEvent
@Override
public boolean alreadyApplied ()
{
return (_oldEntry != UNSET_OLD_ENTRY);
}
@Override // from DEvent
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -114,7 +114,7 @@ public class EntryUpdatedEvent<T extends DSet.Entry> extends NamedEvent
return true;
}
// documentation inherited
@Override
protected void notifyListener (Object listener)
{
if (listener instanceof SetListener) {
@@ -123,7 +123,7 @@ public class EntryUpdatedEvent<T extends DSet.Entry> extends NamedEvent
}
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
buf.append("ELUPD:");
@@ -107,9 +107,7 @@ public class InvocationNotificationEvent extends DEvent
return _args;
}
/**
* Applies this attribute change to the object.
*/
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -117,13 +115,13 @@ public class InvocationNotificationEvent extends DEvent
return true;
}
// documentation inherited
@Override
protected void notifyListener (Object listener)
{
// nothing to do here
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
buf.append("INOT:");
@@ -102,9 +102,7 @@ public class InvocationRequestEvent extends DEvent
return _args;
}
/**
* Applies this attribute change to the object.
*/
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -112,13 +110,13 @@ public class InvocationRequestEvent extends DEvent
return true;
}
// documentation inherited
@Override
protected void notifyListener (Object listener)
{
// nothing to do here
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
buf.append("IREQ:");
@@ -102,9 +102,7 @@ public class InvocationResponseEvent extends DEvent
return _args;
}
/**
* Applies this attribute change to the object.
*/
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -112,13 +110,13 @@ public class InvocationResponseEvent extends DEvent
return true;
}
// documentation inherited
@Override
protected void notifyListener (Object listener)
{
// nothing to do here
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
buf.append("IRSP:");
@@ -94,9 +94,7 @@ public class MessageEvent extends NamedEvent
_args = args;
}
/**
* Applies this attribute change to the object.
*/
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -104,7 +102,7 @@ public class MessageEvent extends NamedEvent
return true;
}
// documentation inherited
@Override
protected void notifyListener (Object listener)
{
if (listener instanceof MessageListener) {
@@ -112,7 +110,7 @@ public class MessageEvent extends NamedEvent
}
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
buf.append("MSG:");
@@ -71,6 +71,7 @@ public abstract class NamedEvent extends DEvent
return _name;
}
@Override
protected void toString (StringBuilder buf)
{
super.toString(buf);
@@ -63,9 +63,7 @@ public class ObjectAddedEvent extends NamedEvent
return _oid;
}
/**
* Applies this event to the object.
*/
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -74,7 +72,7 @@ public class ObjectAddedEvent extends NamedEvent
return true;
}
// documentation inherited
@Override
protected void notifyListener (Object listener)
{
if (listener instanceof OidListListener) {
@@ -82,7 +80,7 @@ public class ObjectAddedEvent extends NamedEvent
}
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
buf.append("OBJADD:");
@@ -49,7 +49,7 @@ public class ObjectDestroyedEvent extends DEvent
{
}
// documentation inherited
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -58,7 +58,7 @@ public class ObjectDestroyedEvent extends DEvent
return true;
}
// documentation inherited
@Override
protected void notifyListener (Object listener)
{
if (listener instanceof ObjectDeathListener) {
@@ -66,7 +66,7 @@ public class ObjectDestroyedEvent extends DEvent
}
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
buf.append("DESTROY:");
@@ -64,9 +64,7 @@ public class ObjectRemovedEvent extends NamedEvent
return _oid;
}
/**
* Applies this event to the object.
*/
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -75,7 +73,7 @@ public class ObjectRemovedEvent extends NamedEvent
return true;
}
// documentation inherited
@Override
protected void notifyListener (Object listener)
{
if (listener instanceof OidListListener) {
@@ -83,7 +81,7 @@ public class ObjectRemovedEvent extends NamedEvent
}
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
buf.append("OBJREM:");
@@ -133,6 +133,7 @@ public class OidList implements Streamable
return _oids[index];
}
@Override
public String toString ()
{
StringBuilder buf = new StringBuilder();
@@ -54,7 +54,7 @@ public class ReleaseLockEvent extends NamedEvent
{
}
// documentation inherited
@Override
public boolean isPrivate ()
{
// we need only run on the server; no need to propagate to proxies
@@ -64,6 +64,7 @@ public class ReleaseLockEvent extends NamedEvent
/**
* Applies this lock release to the object.
*/
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -73,6 +74,7 @@ public class ReleaseLockEvent extends NamedEvent
return false;
}
@Override
protected void toString (StringBuilder buf)
{
buf.append("UNLOCK:");
@@ -82,9 +82,7 @@ public class AuthRequest extends UpstreamMessage
return _bootGroups;
}
/**
* Generates a string representation of this instance.
*/
@Override
public String toString ()
{
return "[type=AREQ, msgid=" + messageId + ", creds=" + _creds +
@@ -66,6 +66,7 @@ public class AuthResponse extends DownstreamMessage
_data = data;
}
@Override
public String toString ()
{
return "[type=ARSP, msgid=" + messageId + ", data=" + _data + "]";
@@ -52,6 +52,7 @@ public class BootstrapNotification extends DownstreamMessage
return _data;
}
@Override
public String toString ()
{
return "[type=BOOT, msgid=" + messageId + ", data=" + _data + "]";
@@ -71,13 +71,13 @@ public abstract class Credentials implements Streamable
return "";
}
// documentation inherited
@Override
public int hashCode ()
{
return _username.hashCode();
}
// documentation inherited
@Override
public boolean equals (Object other)
{
if (other instanceof Credentials) {
@@ -87,9 +87,7 @@ public abstract class Credentials implements Streamable
}
}
/**
* Generates a string representation of this instance.
*/
@Override
public String toString ()
{
StringBuilder buf = new StringBuilder("[");
@@ -35,9 +35,7 @@ public abstract class DownstreamMessage extends Message
*/
public short messageId = -1;
/**
* Generates a string representation of this instance.
*/
@Override
public String toString ()
{
return "[msgid=" + messageId + "]";
@@ -59,6 +59,7 @@ public class EventNotification extends DownstreamMessage
return _event.getTransport();
}
@Override
public String toString ()
{
return "[type=EVT, evt=" + _event + "]";
@@ -50,6 +50,7 @@ public class FailureResponse extends DownstreamMessage
return _message;
}
@Override
public String toString ()
{
return "[type=FAIL, msgid=" + messageId + ", oid=" + _oid + ", msg=" + _message + "]";
@@ -62,6 +62,7 @@ public class ForwardEventRequest extends UpstreamMessage
return _event.getTransport();
}
@Override
public String toString ()
{
return "[type=FWD, evt=" + _event + "]";
@@ -31,6 +31,7 @@ public class LogoffRequest extends UpstreamMessage
super();
}
@Override
public String toString ()
{
return "[type=LOGOFF, msgid=" + messageId + "]";
@@ -47,6 +47,7 @@ public class ObjectResponse<T extends DObject>
return _dobj;
}
@Override
public String toString ()
{
return "[type=ORSP, msgid=" + messageId + ", obj=" + _dobj + "]";
@@ -105,6 +105,7 @@ public class PingRequest extends UpstreamMessage
return _transport;
}
@Override
public String toString ()
{
return "[type=PING, msgid=" + messageId + ", transport=" + _transport + "]";
@@ -125,6 +125,7 @@ public class PongResponse extends DownstreamMessage
return _transport;
}
@Override
public String toString ()
{
return "[type=PONG, msgid=" + messageId + ", transport=" + _transport + "]";
@@ -48,6 +48,7 @@ public class SubscribeRequest extends UpstreamMessage
return _oid;
}
@Override
public String toString ()
{
return "[type=SUB, msgid=" + messageId + ", oid=" + _oid + "]";
@@ -40,6 +40,7 @@ public class Transport
* and without duplicates. Functionally identical to UDP.
*/
UNRELIABLE_UNORDERED(false, false) {
@Override
public Type combine (Type other) {
return other; // we defer to all
}
@@ -50,6 +51,7 @@ public class Transport
* order and without duplicates. In other words, out-of-order packets will be dropped.
*/
UNRELIABLE_ORDERED(false, true) {
@Override
public Type combine (Type other) {
return other.isReliable() ? RELIABLE_ORDERED : this;
}
@@ -60,6 +62,7 @@ public class Transport
* order.
*/
RELIABLE_UNORDERED(true, false) {
@Override
public Type combine (Type other) {
return other.isOrdered() ? RELIABLE_ORDERED : this;
}
@@ -70,6 +73,7 @@ public class Transport
* Functionally identical to TCP.
*/
RELIABLE_ORDERED(true, true) {
@Override
public Type combine (Type other) {
return this; // we override all
}
@@ -48,6 +48,7 @@ public class UnsubscribeRequest extends UpstreamMessage
return _oid;
}
@Override
public String toString ()
{
return "[type=UNSUB, msgid=" + messageId + ", oid=" + _oid + "]";
@@ -49,6 +49,7 @@ public class UnsubscribeResponse extends DownstreamMessage
return _oid;
}
@Override
public String toString ()
{
return "[type=UNACK, msgid=" + messageId + ", oid=" + _oid + "]";
@@ -52,6 +52,7 @@ public abstract class UpstreamMessage extends Message
this.messageId = nextMessageId();
}
@Override
public String toString ()
{
return "[msgid=" + messageId + "]";
@@ -47,19 +47,19 @@ public class UsernamePasswordCreds extends Credentials
return _password;
}
@Override // documentation inherited
@Override
public String getDatagramSecret ()
{
return _password;
}
// documentation inherited
@Override
public int hashCode ()
{
return super.hashCode() ^ _password.hashCode();
}
// documentation inherited
@Override
public boolean equals (Object other)
{
if (other instanceof UsernamePasswordCreds) {
@@ -71,7 +71,7 @@ public class UsernamePasswordCreds extends Credentials
}
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
super.toString(buf);
@@ -28,7 +28,6 @@ import com.threerings.presents.data.AuthCodes;
import com.threerings.presents.net.AuthRequest;
import com.threerings.presents.net.AuthResponse;
import com.threerings.presents.net.AuthResponseData;
import com.threerings.presents.server.Authenticator;
import com.threerings.presents.server.ChainedAuthenticator;
import com.threerings.presents.server.net.AuthingConnection;
@@ -52,6 +52,7 @@ public class PeerClient extends PresentsClient
* bootstrap data classes that contain extra bootstrap information, if
* desired.
*/
@Override
protected BootstrapData createBootstrapData ()
{
return new PeerBootstrapData();
@@ -67,6 +68,7 @@ public class PeerClient extends PresentsClient
* thread which means that object manipulations are OK, but client
* instance manipulations must be done carefully.
*/
@Override
protected void populateBootstrapData (BootstrapData data)
{
super.populateBootstrapData(data);
@@ -220,6 +220,7 @@ public abstract class PeerManager
_self = new NodeRecord(
_nodeName, hostName, (publicHostName == null) ? hostName : publicHostName, port);
_invoker.postUnit(new WriteOnlyUnit("registerNode(" + _self + ")") {
@Override
public void invokePersist () throws Exception {
_noderepo.updateNode(_self);
}
@@ -701,6 +702,7 @@ public abstract class PeerManager
// clear our record from the node table
_invoker.postUnit(new WriteOnlyUnit("deleteNode(" + _nodeName + ")") {
@Override
public void invokePersist () throws Exception {
_noderepo.deleteNode(_nodeName);
}
@@ -797,12 +799,14 @@ public abstract class PeerManager
{
// load up information on our nodes
_invoker.postUnit(new RepositoryUnit("refreshPeers") {
@Override
public void invokePersist () throws Exception {
// let the world know that we're alive
_noderepo.heartbeatNode(_nodeName);
// then load up all the peer records
_nodes = _noderepo.loadNodes();
}
@Override
public void handleSuccess() {
for (NodeRecord record : _nodes) {
if (record.nodeName.equals(_nodeName)) {
@@ -815,6 +819,7 @@ public abstract class PeerManager
}
}
}
@Override
public long getLongThreshold () {
return 700L;
}
@@ -1011,6 +1016,7 @@ public abstract class PeerManager
// schedule a timeout to act if something goes wrong
(_timeout = new Interval(_omgr) {
@Override
public void expired () {
log.warning("Lock handler timed out, acting anyway [lock=" + _lock +
", acquire=" + _acquire + "].");
@@ -1187,6 +1193,7 @@ public abstract class PeerManager
// (this need not use a runqueue as all it will do is post an invoker unit)
protected Interval _peerRefresher = new Interval() {
@Override
public void expired () {
refreshPeers();
}
@@ -60,6 +60,7 @@ public class PeerNode
_omgr = omgr;
_record = record;
_client = new Client(null, _omgr) {
@Override
protected void convertFromRemote (DObject target, DEvent event) {
super.convertFromRemote(target, event);
// rewrite the event's target oid using the oid currently configured on the
@@ -70,6 +71,7 @@ public class PeerNode
// properly deal with it
event.eventId = PeerNode.this._omgr.getNextEventId(true);
}
@Override
protected Communicator createCommunicator () {
// TODO: make a custom communicator that uses the ClientManager NIO system to do
// its I/O instead of using two threads and blocking socket I/O
@@ -119,9 +119,7 @@ public class NodeRecord extends PersistentRecord
this.nodeName = nodeName;
}
/**
* Generates a string representation of this instance.
*/
@Override
public String toString ()
{
return StringUtil.fieldsToString(this);
@@ -26,7 +26,6 @@ import com.samskivert.io.PersistenceException;
import com.samskivert.util.Invoker;
import com.samskivert.util.ResultListener;
import com.threerings.presents.annotation.MainInvoker;
import com.threerings.presents.data.AuthCodes;
import com.threerings.presents.net.AuthRequest;
@@ -34,8 +33,6 @@ import com.threerings.presents.net.AuthResponse;
import com.threerings.presents.net.AuthResponseData;
import com.threerings.presents.server.net.AuthingConnection;
import com.threerings.presents.server.net.ConnectionManager;
import static com.threerings.presents.Log.log;
/**
@@ -57,6 +54,7 @@ public abstract class Authenticator
final AuthResponse rsp = new AuthResponse(rdata);
invoker.postUnit(new Invoker.Unit("authenticateConnection") {
@Override
public boolean invoke() {
try {
processAuthentication(conn, rsp);
@@ -67,6 +65,7 @@ public abstract class Authenticator
return true;
}
@Override
public void handleResult () {
// stuff a reference to the auth response into the connection so that we have
// access to it later in the authentication process
@@ -23,7 +23,6 @@ package com.threerings.presents.server;
import com.threerings.util.Name;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.net.AuthRequest;
/**
@@ -107,6 +107,7 @@ public class ClientManager
// start up an interval that will check for expired clients and flush them from the bowels
// of the server
new Interval(_omgr) {
@Override
public void expired () {
flushClients();
}
@@ -32,8 +32,6 @@ import com.threerings.util.Name;
import com.threerings.presents.annotation.MainInvoker;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.data.PermissionPolicy;
import com.threerings.presents.dobj.DObject;
import com.threerings.presents.dobj.ObjectAccessException;
import com.threerings.presents.dobj.RootDObjectManager;
import static com.threerings.presents.Log.log;
@@ -92,7 +90,7 @@ public class ClientResolver extends Invoker.Unit
_invoker.postUnit(this);
}
// documentation inherited
@Override
public boolean invoke ()
{
try {
@@ -105,7 +103,7 @@ public class ClientResolver extends Invoker.Unit
return true;
}
// documentation inherited
@Override
public void handleResult ()
{
// if we haven't failed, finish resolution on the dobj thread
@@ -140,7 +138,7 @@ public class ClientResolver extends Invoker.Unit
}
}
// documentation inherited
@Override
public String toString ()
{
return "ClientResolver:" + _username;
@@ -23,8 +23,6 @@ package com.threerings.presents.server;
import com.samskivert.io.PersistenceException;
import com.samskivert.util.Invoker;
import com.threerings.presents.net.AuthResponse;
import com.threerings.presents.net.AuthResponseData;
import com.threerings.presents.server.net.AuthingConnection;
@@ -36,7 +34,7 @@ import static com.threerings.presents.Log.log;
*/
public class DummyAuthenticator extends Authenticator
{
// from abstract Authenticator
@Override
protected void processAuthentication (AuthingConnection conn, AuthResponse rsp)
throws PersistenceException
{
@@ -43,8 +43,6 @@ import com.threerings.presents.dobj.DEvent;
import com.threerings.presents.dobj.DObject;
import com.threerings.presents.dobj.EventListener;
import com.threerings.presents.dobj.InvocationRequestEvent;
import com.threerings.presents.dobj.ObjectAccessException;
import com.threerings.presents.net.Transport;
import static com.threerings.presents.Log.log;
@@ -75,13 +75,13 @@ public class LocalDObjectMgr extends PresentsDObjectMgr
};
}
// documentation inherited
@Override
public synchronized boolean isDispatchThread ()
{
return EventQueue.isDispatchThread();
}
// documentation inherited
@Override
public void postEvent (final DEvent event)
{
EventQueue.invokeLater(new Runnable() {
@@ -91,7 +91,7 @@ public class LocalDObjectMgr extends PresentsDObjectMgr
});
}
// documentation inherited
@Override
public void postRunnable (Runnable unit)
{
// we just pass this right on to the AWT event queue rather than running them through
@@ -51,6 +51,7 @@ public class NativeSignalHandler extends AbstractSignalHandler
return true;
}
@Override
protected boolean registerHandlers ()
{
if (!SignalManager.servicesAvailable()) {
@@ -807,9 +807,7 @@ public class PresentsClient
return false;
}
/**
* Generates a string representation of this instance.
*/
@Override
public String toString ()
{
StringBuilder buf = new StringBuilder("[");
@@ -29,7 +29,6 @@ import com.google.common.collect.Maps;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.samskivert.util.AuditLogger;
import com.samskivert.util.Histogram;
import com.samskivert.util.IntMap;
import com.samskivert.util.IntMaps;
@@ -845,11 +844,13 @@ public class PresentsDObjectMgr
_action = action;
}
@Override
public boolean isPrivate ()
{
return true;
}
@Override
public boolean applyToObject (DObject target)
throws ObjectAccessException
{
@@ -930,6 +931,7 @@ public class PresentsDObjectMgr
return (this.reffingOid == reffingOid && this.field.equals(field));
}
@Override
public String toString ()
{
return "[reffingOid=" + reffingOid + ", field=" + field +
@@ -947,6 +949,7 @@ public class PresentsDObjectMgr
_histo.addValue((int)elapsed);
}
@Override
public String toString ()
{
int count = _histo.size();
@@ -21,8 +21,6 @@
package com.threerings.presents.server;
import java.util.Iterator;
import com.google.inject.Inject;
import com.google.inject.Singleton;
@@ -134,6 +132,7 @@ public class PresentsInvoker extends Invoker
protected class ShutdownUnit extends Unit
{
// run on the invoker thread
@Override
public boolean invoke ()
{
if (checkLoops()) {
@@ -154,6 +153,7 @@ public class PresentsInvoker extends Invoker
}
// run on the dobj thread
@Override
public void handleResult ()
{
if (checkLoops()) {
@@ -206,6 +206,7 @@ public class PresentsInvoker extends Invoker
// end the invoker thread
postUnit(new Unit() {
@Override
public boolean invoke () {
_running = false;
return false;
@@ -148,6 +148,7 @@ public abstract class RebootManager
_rebootSoon = false;
long firstWarnTime = (_nextReboot - (WARNINGS[0] * 60 * 1000)) - now;
_interval = new Interval(_omgr) {
@Override
public void expired () {
doWarning(0);
}
@@ -238,6 +239,7 @@ public abstract class RebootManager
// wait 1 second, then do it
new Interval() { // Note: This interval does not run on the dobj thread
@Override
public void expired () {
// ...but we then post a LongRunnable...
_omgr.postRunnable(new PresentsDObjectMgr.LongRunnable() {
@@ -265,6 +267,7 @@ public abstract class RebootManager
// schedule the next warning
_interval = new Interval(_omgr) {
@Override
public void expired () {
doWarning(level + 1);
}
@@ -287,6 +290,7 @@ public abstract class RebootManager
StringUtil.toString(_rebootLocks.elements()));
broadcast("m.reboot_delayed");
_interval = new Interval(_omgr) {
@Override
public void expired () {
doWarning(WARNINGS.length);
}
@@ -26,12 +26,10 @@ import com.google.inject.Injector;
import com.samskivert.io.PersistenceException;
import com.samskivert.util.Invoker;
import com.samskivert.util.StringUtil;
import com.threerings.util.MessageBundle;
import com.threerings.presents.net.AuthResponse;
import com.threerings.presents.net.AuthResponseData;
import com.threerings.presents.server.net.AuthingConnection;
import static com.threerings.presents.Log.log;
@@ -51,7 +49,7 @@ public class Rejector extends PresentsServer
}
}
// documentation inherited
@Override
protected int[] getListenPorts ()
{
return _ports;
@@ -87,7 +85,7 @@ public class Rejector extends PresentsServer
*/
protected class RejectingAuthenticator extends Authenticator
{
// from abstract Authenticator
@Override
protected void processAuthentication (AuthingConnection conn, AuthResponse rsp)
throws PersistenceException
{
@@ -30,8 +30,6 @@ import com.samskivert.util.Interval;
import com.samskivert.util.RunQueue;
import com.samskivert.util.StringUtil;
import com.threerings.presents.annotation.EventQueue;
import static com.threerings.presents.Log.log;
/**
@@ -62,6 +60,7 @@ public class ReportManager
{
// queue up an interval which will generate reports
_reportInterval = new Interval(rqueue) {
@Override
public void expired () {
logReport(generateReport(System.currentTimeMillis(), true));
}
@@ -24,13 +24,12 @@ package com.threerings.presents.server;
import com.samskivert.util.RunAnywhere;
import com.samskivert.util.SignalUtil;
import static com.threerings.presents.Log.log;
/**
* Handles signals using Sun's undocumented Signal class.
*/
public class SunSignalHandler extends AbstractSignalHandler
{
@Override
protected boolean registerHandlers ()
{
SignalUtil.register(SignalUtil.Number.TERM, new SignalUtil.Handler() {
@@ -22,8 +22,6 @@
package com.threerings.presents.server;
import java.util.HashMap;
import com.samskivert.util.ResultListener;
import com.threerings.presents.client.TimeBaseService.GotTimeBaseListener;
import com.threerings.presents.data.ClientObject;
@@ -32,8 +30,6 @@ import com.threerings.presents.data.TimeBaseObject;
import com.threerings.presents.dobj.RootDObjectManager;
import static com.threerings.presents.Log.log;
/**
* Provides the server-side of the time base services. The time base services provide a means by
* which delta times can be sent over the network which are expanded based on a shared base time
@@ -101,9 +101,7 @@ public class AuthingConnection extends Connection
_authrsp = authrsp;
}
/**
* Generates a string representation of this instance.
*/
@Override
public String toString ()
{
return "[mode=AUTHING, addr=" +
@@ -36,7 +36,6 @@ import java.security.NoSuchAlgorithmException;
import com.samskivert.util.StringUtil;
import com.threerings.io.ByteBufferInputStream;
import com.threerings.io.ByteBufferOutputStream;
import com.threerings.io.FramedInputStream;
import com.threerings.io.FramingOutputStream;
import com.threerings.io.ObjectInputStream;
@@ -24,7 +24,6 @@ package com.threerings.presents.server.net;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.Channel;
import java.nio.channels.DatagramChannel;
import java.nio.channels.SelectableChannel;
import java.nio.channels.SelectionKey;
@@ -52,7 +51,6 @@ import com.samskivert.util.Invoker;
import com.samskivert.util.LoopingThread;
import com.samskivert.util.Queue;
import com.samskivert.util.ResultListener;
import com.samskivert.util.StringUtil;
import com.samskivert.util.Tuple;
import com.threerings.io.FramingOutputStream;
@@ -281,7 +279,7 @@ public class ConnectionManager extends LoopingThread
}
}
// documentation inherited
@Override
protected void willStart ()
{
int successes = 0;
@@ -414,6 +412,7 @@ public class ConnectionManager extends LoopingThread
/**
* Performs the select loop. This is the body of the conmgr thread.
*/
@Override
protected void iterate ()
{
long iterStamp = System.currentTimeMillis();
@@ -708,14 +707,14 @@ public class ConnectionManager extends LoopingThread
_stats.bytesOut += bytes;
}
// documentation inherited
@Override
protected void handleIterateFailure (Exception e)
{
// log the exception
log.warning("ConnectionManager.iterate() uncaught exception.", e);
}
// documentation inherited
@Override
protected void didShutdown ()
{
// take one last crack at the outgoing message queue
@@ -1026,9 +1025,7 @@ public class ConnectionManager extends LoopingThread
_partial.flip();
}
/**
* Returns a string representation of this instance.
*/
@Override
public String toString ()
{
return "[conn=" + conn + ", partials=" + _partials + ", msgs=" + _msgs + "]";
@@ -51,6 +51,7 @@ public class RunningConnection extends Connection
{
}
@Override
public String toString ()
{
return "[mode=RUNNING, id=" + (hashCode() % 1000) +
@@ -975,6 +975,7 @@ public class ActionScriptSource
writer.flush();
}
@Override
public String toString ()
{
StringBuilder builder = new StringBuilder();

Some files were not shown because too many files have changed in this diff Show More