Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

COSMOS Programming Model

Revision as of 15:24, 10 October 2007 by Hkyleung.ca.ibm.com (Talk | contribs) (Creating an MDR)

COSMOS provides a framework for collecting and visualizing data for system administration applications. By leveraging the COSMOS framework and providing the necessary extensions, programmers can quickly and easily create applications for collecting data from disparate data sources, and making data available through standard-based APIs or an easy-to-use user interface. This document explains the programming model used in extending the COSMOS framework.

Creating a Data Manager

Class Diagrams

Creating an MDR

Prerequisite: Import the framework bundles into workspace or install them in the target plaform.

  • Create a plugin project. In the "Target Platform" section, select "an OSGi framework", and select "standard" from the dropdown box. Click next to provide plugin ID, name, etc, and click Finish.
  • Edit the MANIFEST.MF file in the Plug-in Manifest Editor. On the Dependencies tab, add the following dependencies and save the file:
    • org.apache.muse.complete
    • org.eclipse.cosmos.dc.sandbox.dataManager
    • org.eclipse.cosmos.dc.sandbox.mdr
  • An activator class is generated when the OSGi bundle created. Open the Activator java file in the editor. COSMOS framework comes with an abstract activator that contains code required by the activators of all data managers. Make the following updates in the activator java class:
    • Remove the "start" and "stop" method stubs generated by the eclipse.
    • Make the Activator class extend AbstractDataManagerActivator
    • Implement the getDataManagerInstance abract method. The method will return an instance of the class that implements the capabilities. The activator will look like the following.
public class Activator extends AbstractDataManagerActivator {

	protected IDataManager getDataManagerInstance() {
		return new MyDataManager();
	}

}

Providing Custom Capabilities

Packaging for deployment

Back to the top