gov.llnl.babel.backend.rmi2
Class GenerateRmiServer

java.lang.Object
  extended by gov.llnl.babel.backend.rmi2.GenerateRmiServer
All Implemented Interfaces:
CodeGenerator

public class GenerateRmiServer
extends java.lang.Object
implements CodeGenerator

This class is responsible for generating the Rmi server-side code. It will generate Rmi extension types for classes and interfaces, and it will generate native Rmi for enumerated types.


Constructor Summary
GenerateRmiServer()
          Create a Rmi server generator.
 
Method Summary
 void generateCode(java.util.Set symbols)
          Generate Rmi server-side code for each SymbolID in the set argument.
 java.util.Set getLanguages()
          Return the set of language names that this generator supports.
 java.lang.String getType()
          Return the type of generator.
 boolean getUserSymbolsOnly()
          Return true if and only if this code factory should only operate on symbols outside the sidl namespace (i.e., exclude symbols from the sidl runtime library).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenerateRmiServer

public GenerateRmiServer()
Create a Rmi server generator.

Method Detail

generateCode

public void generateCode(java.util.Set symbols)
                  throws CodeGenerationException
Generate Rmi server-side code for each SymbolID in the set argument. This is the initial entry point for generating the server-side code. This routine assumes that all necessary symbols are available in the symbol table. This method generates the server-side code as a set of files and directories.

Specified by:
generateCode in interface CodeGenerator
Parameters:
symbols - a set of SymbolID objects.
Throws:
CodeGenerationException - provide feedback when code generation fails for one reason or another.
See Also:
SymbolID

getType

public java.lang.String getType()
Description copied from interface: CodeGenerator
Return the type of generator. Currently, there are three types of generator "stub", "skel" and "ior". "xml" might be added someday.

Specified by:
getType in interface CodeGenerator

getUserSymbolsOnly

public boolean getUserSymbolsOnly()
Description copied from interface: CodeGenerator
Return true if and only if this code factory should only operate on symbols outside the sidl namespace (i.e., exclude symbols from the sidl runtime library). This is typically true for C and Python where the stubs for the sidl runtime library are pregenerated. Generally, this should be true for anything other than a stub. Implementors do not need to worry about the special case of generating the sidl runtime library itself.

Specified by:
getUserSymbolsOnly in interface CodeGenerator

getLanguages

public java.util.Set getLanguages()
Description copied from interface: CodeGenerator
Return the set of language names that this generator supports. Normally, there is one one name per generator. However, the C++ generator can be referred to as cxx or c++, so it has two in its set. The names should be lower case. Some examples are "c", "ior", "c++", etc.

Specified by:
getLanguages in interface CodeGenerator
Returns:
a Set of strings. Each string is a language name that this generator supports.