The great invocation services rethink of 2002! Rearchitected the remote

method invocation services and converted everything to the new style.
Could this be my biggest checkin ever?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1642 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-08-14 19:08:01 +00:00
parent 4481c5f835
commit e54a4d41f4
161 changed files with 6083 additions and 2805 deletions
+5 -5
View File
@@ -1,5 +1,5 @@
//
// $Id: decoder.tmpl,v 1.1 2002/08/11 05:53:13 mdb Exp $
// $Id: decoder.tmpl,v 1.2 2002/08/14 19:07:48 mdb Exp $
package [% package %];
@@ -12,8 +12,8 @@ import [% import %];
*/
public class [% name %]Decoder extends InvocationDecoder
{
/** The id used to identify this notification receiver. */
public static final short RECEIVER_ID = [% receiver_id %];
/** The generated hash code used to identify this receiver class. */
public static final String RECEIVER_CODE = "[% receiver_code %]";
[% FOREACH method = methods -%]
/** The method id used to dispatch {@link [% name %]Receiver#[% method.mname %]}
@@ -31,9 +31,9 @@ public class [% name %]Decoder extends InvocationDecoder
}
// documentation inherited
public int getReceiverId ()
public String getReceiverCode ()
{
return RECEIVER_ID;
return RECEIVER_CODE;
}
// documentation inherited
+2 -2
View File
@@ -1,5 +1,5 @@
//
// $Id: dispatcher.tmpl,v 1.1 2002/08/09 03:36:09 mdb Exp $
// $Id: dispatcher.tmpl,v 1.2 2002/08/14 19:07:48 mdb Exp $
package [% package %];
@@ -36,7 +36,7 @@ public class [% name %]Dispatcher extends InvocationDispatcher
[% FOREACH method = methods -%]
case [% name %]Marshaller.[% method.mcode %]:
(([% name %]Provider)provider).[% method.mname %](
source,
source[% IF method.unwrapped_args %],[% END %]
[% method.unwrapped_args %]
);
return;
+2 -2
View File
@@ -1,5 +1,5 @@
//
// $Id: marshaller.tmpl,v 1.1 2002/08/09 03:36:09 mdb Exp $
// $Id: marshaller.tmpl,v 1.2 2002/08/14 19:07:48 mdb Exp $
package [% package %];
@@ -34,8 +34,8 @@ public class [% name %]Marshaller extends InvocationMarshaller
callerOid, requestId, [% lm.mcode %],
new Object[] { [% lm.wrapped_args %] }));
}
[% END -%]
[% END -%]
// documentation inherited
public void dispatchResponse (int methodId, Object[] args)
{
+3 -3
View File
@@ -1,5 +1,5 @@
//
// $Id: sender.tmpl,v 1.1 2002/08/11 05:53:13 mdb Exp $
// $Id: sender.tmpl,v 1.2 2002/08/14 19:07:48 mdb Exp $
package [% package %];
@@ -19,10 +19,10 @@ public class [% name %]Sender extends InvocationSender
* [% name %]Receiver#[% m.mname %]} on a client.
*/
public static void [% m.sname %] (
ClientObject target, [% m.arglist %])
ClientObject target[% IF m.arglist %], [% END %][% m.arglist %])
{
sendNotification(
target, [% name %]Decoder.RECEIVER_ID, [% name %]Decoder.[% m.mcode %],
target, [% name %]Decoder.RECEIVER_CODE, [% name %]Decoder.[% m.mcode %],
new Object[] { [% m.wrapped_args %] });
}