org.npsnet.xrti.utilities
Class ProxyCompiler

java.lang.Object
  extended byorg.npsnet.xrti.utilities.ProxyCompiler

public class ProxyCompiler
extends java.lang.Object

The XRTI proxy compiler. May be invoked as a command line application or by using the static compileProxies method (from within an Ant task, for instance).

Author:
Andrzej Kapolka

Constructor Summary
ProxyCompiler()
           
 
Method Summary
 void compileProxies()
          Generates Java source code for a set of proxy classes corresponding to the object and interaction classes described in the federation description document.
 java.io.File getFederationDescriptionDocument()
          Returns the location of the federation description document.
 java.lang.String getInteractionListenerName()
          Returns the (unprefixed) name of the interaction listener interface.
 java.lang.String getPackagePrefix()
          Returns the package prefix.
 java.lang.String getProxyAmbassadorName()
          Returns the (unprefixed) name of the proxy ambassador class.
 java.io.File getTargetDirectory()
          Returns the target directory in which to place generated source files.
static void main(java.lang.String[] args)
          The application entry point.
 void setFederationDescriptionDocument(java.io.File pFederationDescriptionDocument)
          Sets the location of the federation description document.
 void setInteractionListenerName(java.lang.String pInteractionListenerName)
          Sets the (unprefixed) name of the interaction listener interface.
 void setPackagePrefix(java.lang.String pPackagePrefix)
          Sets the package prefix.
 void setProxyAmbassadorName(java.lang.String pProxyAmbassadorName)
          Sets the (unprefixed) name of the proxy ambassador class.
 void setTargetDirectory(java.io.File pTargetDirectory)
          Sets the target directory in which to place generated source files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyCompiler

public ProxyCompiler()
Method Detail

main

public static void main(java.lang.String[] args)
The application entry point.

Parameters:
args - the command line arguments

setFederationDescriptionDocument

public void setFederationDescriptionDocument(java.io.File pFederationDescriptionDocument)
Sets the location of the federation description document.

Parameters:
pFederationDescriptionDocument - the location of the federation description document

getFederationDescriptionDocument

public java.io.File getFederationDescriptionDocument()
Returns the location of the federation description document.

Returns:
the location of the federation description document

setTargetDirectory

public void setTargetDirectory(java.io.File pTargetDirectory)
Sets the target directory in which to place generated source files.

Parameters:
pTargetDirectory - the target directory in which to place generated source files

getTargetDirectory

public java.io.File getTargetDirectory()
Returns the target directory in which to place generated source files.

Returns:
the target directory in which to place generated source files

setPackagePrefix

public void setPackagePrefix(java.lang.String pPackagePrefix)
Sets the package prefix.

Parameters:
pPackagePrefix - the package prefix

getPackagePrefix

public java.lang.String getPackagePrefix()
Returns the package prefix.

Returns:
the package prefix

setProxyAmbassadorName

public void setProxyAmbassadorName(java.lang.String pProxyAmbassadorName)
Sets the (unprefixed) name of the proxy ambassador class.

Parameters:
pProxyAmbassadorName - the (unprefixed) name of the proxy ambassador class

getProxyAmbassadorName

public java.lang.String getProxyAmbassadorName()
Returns the (unprefixed) name of the proxy ambassador class.

Returns:
the (unprefixed) name of the proxy ambassador class

setInteractionListenerName

public void setInteractionListenerName(java.lang.String pInteractionListenerName)
Sets the (unprefixed) name of the interaction listener interface.

Parameters:
pInteractionListenerName - the (unprefixed) name of the interaction listener interface

getInteractionListenerName

public java.lang.String getInteractionListenerName()
Returns the (unprefixed) name of the interaction listener interface.

Returns:
the (unprefixed) name of the interaction listener interface

compileProxies

public void compileProxies()
                    throws CouldNotOpenFDD,
                           ErrorReadingFDD,
                           TypeConflictException
Generates Java source code for a set of proxy classes corresponding to the object and interaction classes described in the federation description document. Any existing files will be overwritten.

Throws:
CouldNotOpenFDD - if the federation description document could not be opened
ErrorReadingFDD - if the federation description document is invalid
TypeConflictException - if a type conflict is encountered