Some type safety, redundant cast removal, and other code hygiene.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4879 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -34,31 +34,28 @@ import com.threerings.presents.dobj.InvocationNotificationEvent;
|
||||
public abstract class InvocationSender
|
||||
{
|
||||
/**
|
||||
* Requests that the specified invocation notification be packaged up
|
||||
* and sent to the supplied target client.
|
||||
* Requests that the specified invocation notification be packaged up and sent to the supplied
|
||||
* target client.
|
||||
*/
|
||||
public static void sendNotification (
|
||||
ClientObject target, String receiverCode, int methodId, Object[] args)
|
||||
{
|
||||
// convert the receiver hash id into the code used on this
|
||||
// specific client
|
||||
Registration rreg = (Registration)target.receivers.get(receiverCode);
|
||||
Registration rreg = target.receivers.get(receiverCode);
|
||||
if (rreg == null) {
|
||||
Log.warning("Unable to locate receiver for invocation " +
|
||||
"service notification [clobj=" + target.who() +
|
||||
", code=" + receiverCode + ", methId=" + methodId +
|
||||
", args=" + StringUtil.toString(args) + "].");
|
||||
Log.warning("Unable to locate receiver for invocation service notification " +
|
||||
"[clobj=" + target.who() + ", code=" + receiverCode +
|
||||
", methId=" + methodId + ", args=" + StringUtil.toString(args) + "].");
|
||||
Thread.dumpStack();
|
||||
|
||||
} else {
|
||||
// Log.info("Sending notification [target=" + target +
|
||||
// ", code=" + receiverCode + ", methodId=" + methodId +
|
||||
// ", args=" + StringUtil.toString(args) + "].");
|
||||
// Log.info("Sending notification [target=" + target + ", code=" + receiverCode +
|
||||
// ", methodId=" + methodId + ", args=" + StringUtil.toString(args) + "].");
|
||||
|
||||
// create and dispatch an invocation notification event
|
||||
target.postEvent(
|
||||
new InvocationNotificationEvent(
|
||||
target.getOid(), rreg.receiverId, methodId, args));
|
||||
new InvocationNotificationEvent(target.getOid(), rreg.receiverId, methodId, args));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user