diff --git a/lib/decoder.tmpl b/lib/decoder.tmpl deleted file mode 100644 index 305e8ac7f..000000000 --- a/lib/decoder.tmpl +++ /dev/null @@ -1,55 +0,0 @@ -// -// [% idstr %] - -package [% package %]; - -[% FOREACH import = imports -%] -import [% import %]; -[% END -%] - -/** - * Dispatches calls to a {@link [% name %]Receiver} instance. - */ -public class [% name %]Decoder extends InvocationDecoder -{ - /** 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 %]} - * notifications. */ - public static final int [% method.mcode %] = [% method.mcodeval %]; - -[% END -%] - /** - * Creates a decoder that may be registered to dispatch invocation - * service notifications to the specified receiver. - */ - public [% name %]Decoder ([% name %]Receiver receiver) - { - this.receiver = receiver; - } - - // documentation inherited - public String getReceiverCode () - { - return RECEIVER_CODE; - } - - // documentation inherited - public void dispatchNotification (int methodId, Object[] args) - { - switch (methodId) { -[% FOREACH method = methods -%] - case [% method.mcode %]: - (([% name %]Receiver)receiver).[% method.mname %]( - [% method.unwrapped_args %] - ); - return; - -[% END -%] - default: - super.dispatchNotification(methodId, args); - } - } -} diff --git a/lib/dispatcher.tmpl b/lib/dispatcher.tmpl deleted file mode 100644 index 666606f50..000000000 --- a/lib/dispatcher.tmpl +++ /dev/null @@ -1,49 +0,0 @@ -// -// [% idstr %] - -package [% package %]; - -[% FOREACH import = imports -%] -import [% import %]; -[% END -%] - -/** - * Dispatches requests to the {@link [% name %]Provider}. - */ -public class [% name %]Dispatcher extends InvocationDispatcher -{ - /** - * Creates a dispatcher that may be registered to dispatch invocation - * service requests for the specified provider. - */ - public [% name %]Dispatcher ([% name %]Provider provider) - { - this.provider = provider; - } - - // documentation inherited - public InvocationMarshaller createMarshaller () - { - return new [% name %]Marshaller(); - } - - // documentation inherited - public void dispatchRequest ( - ClientObject source, int methodId, Object[] args) - throws InvocationException - { - switch (methodId) { -[% FOREACH method = methods -%] - case [% name %]Marshaller.[% method.mcode %]: - (([% name %]Provider)provider).[% method.mname %]( - source[% IF method.unwrapped_args %],[% END %] - [% method.unwrapped_args %] - ); - return; - -[% END -%] - default: - super.dispatchRequest(source, methodId, args); - } - } -} diff --git a/lib/marshaller.tmpl b/lib/marshaller.tmpl deleted file mode 100644 index 91fde31dd..000000000 --- a/lib/marshaller.tmpl +++ /dev/null @@ -1,74 +0,0 @@ -// -// [% idstr %] - -package [% package %]; - -[% FOREACH import = imports -%] -import [% import %]; -[% END -%] - -/** - * Provides the implementation of the {@link [% name %]Service} interface - * that marshalls the arguments and delivers the request to the provider - * on the server. Also provides an implementation of the response listener - * interfaces that marshall the response arguments and deliver them back - * to the requesting client. - */ -public class [% name %]Marshaller extends InvocationMarshaller - implements [% name %]Service -{ -[% FOREACH l = listeners -%] - // documentation inherited - public static class [% l.name %]Marshaller extends ListenerMarshaller - implements [% l.name %]Listener - { -[% FOREACH lm = l.methods -%] - /** The method id used to dispatch {@link #[% lm.mname %]} - * responses. */ - public static final int [% lm.mcode %] = [% lm.mcodeval %]; - - // documentation inherited from interface - public void [% lm.mname %] ([% lm.arglist %]) - { - omgr.postEvent(new InvocationResponseEvent( - callerOid, requestId, [% lm.mcode %], - new Object[] { [% lm.wrapped_args %] })); - } - -[% END -%] - // documentation inherited - public void dispatchResponse (int methodId, Object[] args) - { - switch (methodId) { -[% FOREACH lm = l.methods -%] - case [% lm.mcode %]: - (([% l.name %]Listener)listener).[% lm.mname %]( - [% lm.unwrapped_args %]); - return; - -[% END -%] - default: - super.dispatchResponse(methodId, args); - } - } - } - -[% END -%] -[% FOREACH m = methods -%] - /** The method id used to dispatch {@link #[% m.mname %]} requests. */ - public static final int [% m.mcode %] = [% m.mcodeval %]; - - // documentation inherited from interface - public void [% m.mname %] ([% m.arglist %]) - { -[% FOREACH la = m.listener_args -%] - [% la.mtype %] [% la.aname %] = new [% la.mtype %](); - [% la.aname %].listener = [% la.oaname %]; -[% END -%] - sendRequest(arg1, [% m.mcode %], new Object[] { - [% m.wrapped_args %] - }); - } - -[% END -%] -} diff --git a/lib/sender.tmpl b/lib/sender.tmpl deleted file mode 100644 index c32dd4f3b..000000000 --- a/lib/sender.tmpl +++ /dev/null @@ -1,30 +0,0 @@ -// -// [% idstr %] - -package [% package %]; - -[% FOREACH import = imports -%] -import [% import %]; -[% END -%] - -/** - * Used to issue notifications to a {@link [% name %]Receiver} instance on a - * client. - */ -public class [% name %]Sender extends InvocationSender -{ -[% FOREACH m = methods -%] - /** - * Issues a notification that will result in a call to {@link - * [% name %]Receiver#[% m.mname %]} on a client. - */ - public static void [% m.sname %] ( - ClientObject target[% IF m.arglist %], [% END %][% m.arglist %]) - { - sendNotification( - target, [% name %]Decoder.RECEIVER_CODE, [% name %]Decoder.[% m.mcode %], - new Object[] { [% m.wrapped_args %] }); - } - -[% END -%] -}