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

Difference between revisions of "COSMOS Bug Design 209248"

Line 7: Line 7:
 
The annotations should provide support for this model in order to
 
The annotations should provide support for this model in order to
 
enforce/encourage alignment with the existing Muse programming model.
 
enforce/encourage alignment with the existing Muse programming model.
 +
 +
<pre>
 +
 +
/**
 +
* Annotation used to decorate a ManagedResource with externally implemented capabilities
 +
*/
 +
@Target(TYPE)
 +
@Retention(RUNTIME)
 +
public @interface ComposableManagedCapabilitySet {
 +
 +
/**
 +
* The set of capability classes to decorate the targeted
 +
* ManagedResource instance with. This annotation works
 +
* in conjunction with the ManagedFrameworkAutowire,
 +
* ManagedResourceCapability, and ManagedResourceFactory 
 +
* annotations to enable the framework to replicate the
 +
* delcarative programming model exposed by Muse.xml 
 +
*/
 +
Class[] set() default {};
 +
 +
}
 +
</pre>
  
 
<pre>
 
<pre>

Revision as of 16:39, 16 November 2007

The Muse programming model is a composition-oriented model, where capabilities can be imposed on a resource implementation externally. In the annotations, the composition model can be supported programatically by creating a single facade over multiple capability implementations, but the annotations don't provide any support to make this easier.

The annotations should provide support for this model in order to enforce/encourage alignment with the existing Muse programming model.


/**
 * Annotation used to decorate a ManagedResource with externally implemented capabilities 
 */
@Target(TYPE)
@Retention(RUNTIME)
public @interface ComposableManagedCapabilitySet {

	/**
	 * The set of capability classes to decorate the targeted 
	 * ManagedResource instance with. This annotation works
	 * in conjunction with the ManagedFrameworkAutowire, 
	 * ManagedResourceCapability, and ManagedResourceFactory  
	 * annotations to enable the framework to replicate the
	 * delcarative programming model exposed by Muse.xml  
	 */
	Class[] set() default {};
	
}

/**
 * Annotation used to support autowiring of 
 * Components within the management framework.
 */
@Target(FIELD)
@Retention(RUNTIME)
public @interface ManagedFrameworkAutowire {
	/**
	 * Name of the desired Component
	 */
	String name() default "";
	
	/**
	 * Class of the desired Capability. This attribute works 
	 * in conjunction with the ComposableManagedCapabilitySet
	 *  annotation
	 */
	Class capability() default Void.class;
}

Back to the top