The PMP Demo is a bundle that uses the PMP Bundle to establish a connection with an OSGi framework running on the same machine, and retrieves the properties of the framework system.
The components of the demo are in the demo/framework/pmp directory.
This includes source and class files, scripts and a readme.txt. The PMP
Demo has only one class - PMPDemo, which is a bundle activator
calling the PMP Service.
The bundle JAR of the PMP Demo is pmpdemo.jar in demo/bundles.
The PMP Demo owns an install script for easier and faster installation of its components as well as of the necessary bundles. For more help about starting the demo through the install script, refer to General Rules for Demos.
To start the demo:
fw.i -s ../../../demo/bundles/pmpdemo.jarIn return, the properties of the framework are printed in the console.
The PMP Demo connects to the OSGi framework by calling the connect
method of the PMP Service passing the initial framework account admin/admin.
import com.prosyst.mbs.services.pmp.PMPService; |
Next, the demo invokes the getProperties method of the System
Service specifying that the result should be passed as a serialized object
from the executing framework.
static String SYSTEM = "com.prosyst.util.system.SystemService"; |
Finally, the demo prints the result.