PTP
Release 5.0

org.eclipse.ptp.core
Class ModelManager

java.lang.Object
  extended by org.eclipse.ptp.core.ModelManager
All Implemented Interfaces:
IModelManager, IModelPresentation

public class ModelManager
extends Object
implements IModelManager

Model manager for resource manager framework.

Since:
5.0

Constructor Summary
ModelManager()
           
 
Method Summary
 void addListener(IResourceManagerListener listener)
          Add a listener for resource manager events.
 void addResourceManager(org.eclipse.ptp.rmsystem.IResourceManager rm)
          Add a resource manager to the model.
 void addResourceManagers(org.eclipse.ptp.rmsystem.IResourceManager[] rms)
          Add resource managers to the model.
 org.eclipse.ptp.rmsystem.IResourceManagerConfiguration createBaseConfiguration(IServiceProvider provider)
          Create a base configuration from the given service provider
 org.eclipse.ptp.rmsystem.IResourceManagerComponentConfiguration createControlConfiguration(IServiceProvider provider)
          Create a control configuration from the given service provider
 org.eclipse.ptp.rmsystem.IResourceManagerComponentConfiguration createMonitorConfiguration(IServiceProvider provider)
          Create a monitor configuration from the given service provider
 void fireResourceManagerChanged(org.eclipse.ptp.rmsystem.IResourceManager rm)
          Fire an event to notify that a resource manager has changed
 void fireResourceManagerError(org.eclipse.ptp.rmsystem.IResourceManager rm, String message)
          Fire an event to notify that a resource manager error has occurred
 String getControlFactoryId(String rmId)
           
static ModelManager getInstance()
           
 String getMonitorFactoryId(String rmId)
           
 org.eclipse.ptp.rmsystem.IResourceManager getResourceManagerFromUniqueName(String rmUniqueName)
          Find the resource manager with the supplied unique name
 org.eclipse.ptp.rmsystem.IResourceManager[] getResourceManagers()
          Get resource managers from the model.
 org.eclipse.ptp.core.elements.IPUniverse getUniverse()
           
 void handleEvent(IResourceManagerErrorEvent e)
           
 void loadResourceManagers()
          Loads saved resource managers.
 void removeListener(IResourceManagerListener listener)
          Remove listener for resource manager events.
 void removeResourceManager(org.eclipse.ptp.rmsystem.IResourceManager rm)
          Remove a resource manager from the model.
 void removeResourceManagers(org.eclipse.ptp.rmsystem.IResourceManager[] rms)
          Remove resource managers from the model.
 void saveResourceManagers()
          Save the resource manager configurations
 void shutdown()
           
 void start()
           
 void stopResourceManagers()
          stops all of the resource managers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelManager

public ModelManager()
Method Detail

addListener

public void addListener(IResourceManagerListener listener)
Description copied from interface: IModelManager
Add a listener for resource manager events.

Specified by:
addListener in interface IModelManager

addResourceManager

public void addResourceManager(org.eclipse.ptp.rmsystem.IResourceManager rm)
Description copied from interface: IModelManager
Add a resource manager to the model.

Specified by:
addResourceManager in interface IModelManager

addResourceManagers

public void addResourceManagers(org.eclipse.ptp.rmsystem.IResourceManager[] rms)
Description copied from interface: IModelManager
Add resource managers to the model.

Specified by:
addResourceManagers in interface IModelManager

createBaseConfiguration

public org.eclipse.ptp.rmsystem.IResourceManagerConfiguration createBaseConfiguration(IServiceProvider provider)
Create a base configuration from the given service provider

Parameters:
provider - service provider
Returns:
base configuration

createControlConfiguration

public org.eclipse.ptp.rmsystem.IResourceManagerComponentConfiguration createControlConfiguration(IServiceProvider provider)
Create a control configuration from the given service provider

Parameters:
provider - service provider
Returns:
control configuration

createMonitorConfiguration

public org.eclipse.ptp.rmsystem.IResourceManagerComponentConfiguration createMonitorConfiguration(IServiceProvider provider)
Create a monitor configuration from the given service provider

Parameters:
provider - service provider
Returns:
monitor configuration

fireResourceManagerChanged

public void fireResourceManagerChanged(org.eclipse.ptp.rmsystem.IResourceManager rm)
Fire an event to notify that a resource manager has changed

Parameters:
rm - rm that has changed
Since:
5.0

fireResourceManagerError

public void fireResourceManagerError(org.eclipse.ptp.rmsystem.IResourceManager rm,
                                     String message)
Fire an event to notify that a resource manager error has occurred

Parameters:
rm - rm that caused the error
message - error message

getControlFactoryId

public String getControlFactoryId(String rmId)

getMonitorFactoryId

public String getMonitorFactoryId(String rmId)

getResourceManagerFromUniqueName

public org.eclipse.ptp.rmsystem.IResourceManager getResourceManagerFromUniqueName(String rmUniqueName)
Description copied from interface: IModelManager
Find the resource manager with the supplied unique name

Specified by:
getResourceManagerFromUniqueName in interface IModelManager
Returns:
resource manager

getResourceManagers

public org.eclipse.ptp.rmsystem.IResourceManager[] getResourceManagers()
Description copied from interface: IModelManager
Get resource managers from the model.

Specified by:
getResourceManagers in interface IModelManager
Returns:
all resource managers know by the model

getUniverse

public org.eclipse.ptp.core.elements.IPUniverse getUniverse()
Specified by:
getUniverse in interface IModelPresentation
Returns:

handleEvent

public void handleEvent(IResourceManagerErrorEvent e)

loadResourceManagers

public void loadResourceManagers()
                          throws org.eclipse.core.runtime.CoreException
Description copied from interface: IModelManager
Loads saved resource managers. Loading of resource manager configuration is now handled by the ServiceModelManager. This method now just starts any resource managers that require autostart.

Specified by:
loadResourceManagers in interface IModelManager
Throws:
org.eclipse.core.runtime.CoreException

removeListener

public void removeListener(IResourceManagerListener listener)
Description copied from interface: IModelManager
Remove listener for resource manager events.

Specified by:
removeListener in interface IModelManager

removeResourceManager

public void removeResourceManager(org.eclipse.ptp.rmsystem.IResourceManager rm)
Description copied from interface: IModelManager
Remove a resource manager from the model.

Specified by:
removeResourceManager in interface IModelManager

removeResourceManagers

public void removeResourceManagers(org.eclipse.ptp.rmsystem.IResourceManager[] rms)
Description copied from interface: IModelManager
Remove resource managers from the model.

Specified by:
removeResourceManagers in interface IModelManager

saveResourceManagers

public void saveResourceManagers()
Description copied from interface: IModelManager
Save the resource manager configurations

Specified by:
saveResourceManagers in interface IModelManager

shutdown

public void shutdown()
              throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

start

public void start()
           throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

stopResourceManagers

public void stopResourceManagers()
                          throws org.eclipse.core.runtime.CoreException
Description copied from interface: IModelManager
stops all of the resource managers.

Specified by:
stopResourceManagers in interface IModelManager
Throws:
org.eclipse.core.runtime.CoreException

getInstance

public static ModelManager getInstance()

PTP
Release 5.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.