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
@@ -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;