Write applications that use the runtime store to communicate with each other. In this example, use the runtime store to obtain an instance of an autonomous background thread and determine its status (paused or running).
Objectives
Discover how to send and receive messages between applications.
In the IDE, open the runtimestore_example.jdw workspace
Open the RuntimeStoreExample.java source file.
Open the RuntimeStoreExampleThread.java source file.
Open the RuntimeStoreExampleAutorun.java source file.
Tasks
In RuntimeStoreExampleAutorun.java, add code to the main method to create and start a RuntimeStoreExampleThread instance.
In RuntimeStoreExample.java, add code to the constructor to retrieve a RuntimeStoreExampleThread object from the runtime store.
In RuntimeStoreExampleThread.java, update the createInstance to retrieve a RuntimeStoreExampleThread object from the runtime store. TIP: Use the ID constant to identify the object. If the object does not already exist in the runtime store, create an object and add it.
Set project properties so that the runtimestore_example_autorun project starts automatically, and the runtimestore_example_library project is a library on which the other two projects depend.