Keep our resources in src/main/resources per the standard project layout.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6251 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2010-11-08 17:31:33 +00:00
parent 07706ec61e
commit 7df0de5389
17 changed files with 3 additions and 2 deletions
@@ -0,0 +1,85 @@
package {{package}};
import javax.annotation.Generated;
{{#imports}}
import {{this}};
{{/imports}}
/**
* 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.
*/
{{generated}}
public class {{name}}Marshaller extends InvocationMarshaller
implements {{name}}Service
{
{{#listeners}}
/**
* Marshalls results to implementations of {@link {{name}}Service.{{listenerName}}Listener}.
*/
public static class {{listenerName}}Marshaller extends ListenerMarshaller
implements {{listenerName}}Listener
{
{{#methods}}
/** The method id used to dispatch {@link #{{method.name}}}
* responses. */
public static final int {{code}} = {{-index}};
// from interface {{listenerName}}Marshaller
public void {{method.name}} ({{getArgList}})
{
_invId = null;
omgr.postEvent(new InvocationResponseEvent(
callerOid, requestId, {{code}},
new Object[] { {{getWrappedArgList}} }, transport));
}
{{/methods}}
@Override // from InvocationMarshaller
{{#hasParameterizedMethodArgs}}
@SuppressWarnings("unchecked")
{{/hasParameterizedMethodArgs}}
public void dispatchResponse (int methodId, Object[] args)
{
switch (methodId) {
{{#methods}}
case {{code}}:
(({{listenerName}}Listener)listener).{{method.name}}(
{{getUnwrappedArgListAsListeners}});
return;
{{/methods}}
default:
super.dispatchResponse(methodId, args);
return;
}
}
}
{{/listeners}}
{{#methods}}
{{^-first}}
{{/-first}}
/** The method id used to dispatch {@link #{{method.name}}} requests. */
public static final int {{code}} = {{-index}};
// from interface {{name}}Service
public void {{method.name}} ({{getArgList}})
{
{{#listenerArgs}}
{{marshaller}} listener{{index}} = new {{marshaller}}();
listener{{index}}.listener = arg{{index}};
{{/listenerArgs}}
sendRequest(arg1, {{code}}, new Object[] {
{{#hasArgsSkipFirst}}
{{getWrappedArgListSkipFirst}}
{{/hasArgsSkipFirst}}
}{{transport}});
}
{{/methods}}
}