Java Samples

Top  Previous  Next

These sample applications are delivered as a Maven project and demonstrate various ways to use the Java interface for the Runtime API.

1.Open the included Maven project (Runtime API\java\examples) in your preferred IDE (for example, NetBeans).

2.View and run individual sample applications located in the Source Packages (com.ai_solutions.freeflyer.runtimeapi.examples and com.ai_solutions.freeflyer.runtimeapi.examples.gui).

 

Note: These examples require JDK 7 or above and Maven 3.3 or above. See the Maven website for Maven installation instructions. The Java interface for the Runtime API is also available through Maven Central (Group ID: com.ai-solutions.freeflyer, Artifact ID: freeflyer-runtimeapi).

 

Jump to an application description in the following table:

 

Example

Complex Multi-Engine Asynchronous

Pass Script to FreeFlyer Through a GUI

 

 

Complex Multi-Engine Asynchronous

This example demonstrates a more complex usage of the runtime API in which four engines are used to execute two Mission Plans asynchronously and asynchronous data is used to coordinate information between the Mission Plans and the application. In this application, the Java runtime API interface is used to read and synch the epochs of a set of two line elements (TLEs). The first Mission Plan that is run reads the epoch of an input TLE and returns it to the application. This Mission Plan is executed asynchronously for each TLE in the set. The application then finds the latest epoch from the set and asynchronously calls the second Mission Plan to synch the TLEs to the latest epoch and report the results to file.

 

For more information on the topics covered by this example, see the Using the Runtime API and Asynchronous Programming guides.

 

Pass Script to FreeFlyer Through a GUI

This application uses a JavaFX GUI interface to obtain arbitrary FreeFlyer script that is then executed via the Java runtime API interface within the FreeFlyer engine. This example demonstrates a very powerful concept of using FreeFlyer entirely as a service where even the code itself is generated outside of the FreeFlyer GUI.

 

The GUI that takes in the script from the user to use with the runtime API.

The GUI that takes in the script from the user to use with the runtime API.

 

Note: This example requires JavaFX Runtime to function.

 

For more information on the topics covered by this example, see the Using the Runtime API guide.