[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ptp-dev] PE proxy ServiceProvider changes
|
Dave,
On Jul 8, 2009, at 10:37 AM, Dave Wootton wrote:
Greg
I'm working on additional changes to the PE and LoadLeveler proxies
for
service configurations and have more questions
I have a ResourceManagerServiceProvider class that extends the
ServiceProvider class and now implements the
IResourceManagerConfiguration interface.
The IResourceManagerConfiguration.getType() method as implemented in
AbstractResourceManagerConfiguration gets the type by calling the
getName() method in the corresponding AbstractResourceManagerFactory
class. It seems that I need to do something similar in the
ResourceManagerServiceProvider class. Should I add a new constructor
to
that class that has the AbstractResourceManagerFactory object as a
parameter so that I have access to the factory class?
The factory name (aka RM type) is only needed by the RM creation
wizard to display something that the user will understand when
creating a new RM. It's obtained from the RM extension point "name"
field, and is something like "IBM Parallel Environment". The RM also
has a name that is set by the user when the RM is created (e.g.
"IBMPE@localhost")
In the new scheme, we've replaced the whole RM factory concept with
service providers. So the RM type should now correspond to the service
provider name.
I was thinking that I had to modify the implementation of the
AbstractResourceManagerFactory.createConfiguration() method to
create and
return an instance of the ResourceManagerServiceProvider class, and
that
meant that I had to move the PEServiceProvider class implementatoion
to
org.eclipse.ptp.rm.ibm.pe.core.rmsystem since it did not seem right to
require the org.eclipse.ptp.rm.ibm.pe.core plugin to depend on the
org.eclipse.ptp.rm.ibm.pe.ui plugin.
THen it occurred to me that all I needed to do was add the additional
constructor to the ResourceManagerServiceProvider class and classes
that
extend it, and everything else would work out since the
ResourceManagerServiceProvider class implements the
IResourceManagerConfiguration interface used elsewhere?
Yes. We should no longer need to use AbstractResourceManagerFactory at
all. Your implementation of IResourceManagerConfiguration should
return the service provider name as the result of getType().
Also, where do these objects get created? Is the factory class
createConfiguration method invodked from soemwhere as an add/create
service provide option somewhere in the service configuration setup
wizard?
The factories are created when the AddResourceManagerAction calls
PTPCorePlugin
.getDefault().getModelManager().getResourceManagerFactories(). The
model manager finds any RM extensions and loads them.
Greg