Added a way to package up an action and data and send it to all appropriate
servers for execution. The class in question must exist on the remote server but all of our servers are all always running the same code, so this follows. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4882 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -44,18 +44,26 @@ public class PeerDispatcher extends InvocationDispatcher
|
||||
this.provider = provider;
|
||||
}
|
||||
|
||||
// from InvocationDispatcher
|
||||
@Override // documentation inherited
|
||||
public InvocationMarshaller createMarshaller ()
|
||||
{
|
||||
return new PeerMarshaller();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked") // from InvocationDispatcher
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override // documentation inherited
|
||||
public void dispatchRequest (
|
||||
ClientObject source, int methodId, Object[] args)
|
||||
throws InvocationException
|
||||
{
|
||||
switch (methodId) {
|
||||
case PeerMarshaller.INVOKE_ACTION:
|
||||
((PeerProvider)provider).invokeAction(
|
||||
source,
|
||||
(byte[])args[0]
|
||||
);
|
||||
return;
|
||||
|
||||
case PeerMarshaller.RATIFY_LOCK_ACTION:
|
||||
((PeerProvider)provider).ratifyLockAction(
|
||||
source,
|
||||
|
||||
Reference in New Issue
Block a user