protected static class RMIWrap.ServerWriter extends RMIWrap.ImplementationWriter
Write foo.ImplServer from foo.API.
implementationName
interfaceClass, interfaceName
Constructor and Description |
---|
RMIWrap.ServerWriter(java.lang.Class interfaceClass,
java.lang.String implementationName)
See superclass.
|
Modifier and Type | Method and Description |
---|---|
(package private) java.lang.String |
classDeclExtra()
Extra stuff (e.g.
|
(package private) void |
processMethod(java.io.PrintWriter out,
java.lang.reflect.Method method)
Called by the default impl of
RMIWrap.WrapperBodyWriter.writeWrapperBody(java.io.PrintWriter) to process a
method of RMIWrap.WrapperBodyWriter.interfaceClass . |
(package private) void |
writeWrapperBody(java.io.PrintWriter out)
Write the body of the wrapper class.
|
writeDropoutHook, writeSignature, writeTypeUnwrap, writeTypeWrap
RMIWrap.ServerWriter(java.lang.Class interfaceClass, java.lang.String implementationName)
See superclass.
void writeWrapperBody(java.io.PrintWriter out)
Write the body of the wrapper class.
Default impl calls RMIWrap.WrapperBodyWriter.processMethod(java.io.PrintWriter, java.lang.reflect.Method)
for all methods of RMIWrap.WrapperBodyWriter.interfaceClass
.
This impl writes
localInstance
localInstance
localInstance
main()
method that calls the automatic constructor to
create a foo.ImplServer and then starts up an RMI registry on the local
host and binds the server to the local (i.e. non-URL) name given on the
command line.writeWrapperBody
in class RMIWrap.WrapperBodyWriter
out
- where to writevoid processMethod(java.io.PrintWriter out, java.lang.reflect.Method method)
Called by the default impl of RMIWrap.WrapperBodyWriter.writeWrapperBody(java.io.PrintWriter)
to process a
method of RMIWrap.WrapperBodyWriter.interfaceClass
.
This impl writes a wrapper wich implements foo.APIRemote and forwards
the call to localInstance
.
processMethod
in class RMIWrap.WrapperBodyWriter
out
- where to writemethod
- the Method to processjava.lang.String classDeclExtra()
Extra stuff (e.g. extends and implements specs) that should be added at the end of the class declaration.
Default impl returns the empty string.
This impl returns e.g. " extends java.rmi.server.UnicastRemoteObject implements foo.APIRemote".
classDeclExtra
in class RMIWrap.WrapperBodyWriter