I agree. However, in the runtime implementation there should be some way to pass in contextual information into the management service instance. Mbean server reference to the JmxManagementService for example. A dirty hack would be to assume the constructor of all implementations would take a runtime info and use that constructor to reflectively instantiate the management service instance.
Ta Meeraj -----Original Message----- From: Jeremy Boynes [mailto:[EMAIL PROTECTED] Sent: Friday, January 05, 2007 3:26 PM To: [email protected] Subject: Re: svn commit: r492824 - /incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/ spi/services/management/ManagementService.java I don't think the RuntimeInfo is part of the service interface here - it's more relevant to the implementation of the service than the client interface. I'll try and think of an alternative. -- Jeremy On Jan 4, 2007, at 4:05 PM, [EMAIL PROTECTED] wrote: > Author: meerajk > Date: Thu Jan 4 16:05:21 2007 > New Revision: 492824 > > URL: http://svn.apache.org/viewvc?view=rev&rev=492824 > Log: > Added RuntimeInfo as part of the ManagementService abstraction. > > Modified: > incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/ > tuscany/spi/services/management/ManagementService.java > > Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/ > apache/tuscany/spi/services/management/ManagementService.java > URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/ > spi/src/main/java/org/apache/tuscany/spi/services/management/ > ManagementService.java?view=diff&rev=492824&r1=492823&r2=492824 > ====================================================================== > ======== > --- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/ > tuscany/spi/services/management/ManagementService.java (original) > +++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/ > tuscany/spi/services/management/ManagementService.java Thu Jan 4 > 16:05:21 2007 > @@ -18,6 +18,7 @@ > */ > package org.apache.tuscany.spi.services.management; > > +import org.apache.tuscany.host.RuntimeInfo; > import org.apache.tuscany.spi.component.Component; > > /** > @@ -28,7 +29,7 @@ > * @version $Revision$ $Date$ > * > */ > -public interface ManagementService { > +public interface ManagementService<R extends RuntimeInfo> { > > /** > * Registers a component for management. > @@ -37,5 +38,11 @@ > * @param component Component to be registered. > */ > void registerComponent(String name, Component component); > + > + /** > + * Sets the runtime info used by the management service. > + * @param runtimeInfo Runtime info for the management service. > + */ > + void setRuntimeIno(R runtimeInfo); > > } > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message has been checked for all email viruses by MessageLabs. ***************************************************** You can find us at www.voca.com ***************************************************** This communication is confidential and intended for the exclusive use of the addressee only. You should not disclose its contents to any other person. If you are not the intended recipient please notify the sender named above immediately. Registered in England, No 1023742, Registered Office: Voca Limited Drake House, Three Rivers Court, Homestead Road, Rickmansworth, Hertfordshire, WD3 1FX This message has been checked for all email viruses by MessageLabs. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
