org.rhq.core.pc.support
Class SupportManager

java.lang.Object
  extended by org.rhq.core.pc.agent.AgentService
      extended by org.rhq.core.pc.support.SupportManager
All Implemented Interfaces:
SupportAgentService, ContainerService

public class SupportManager
extends AgentService
implements SupportAgentService, ContainerService

Manages the inventory's support subsystem, such as the generation of snapshot reports for all resources across all plugins.

This is an agent service; its interface is made remotely accessible if this is deployed within the agent.

Author:
John Mazzitelli

Nested Class Summary
 
Nested classes/interfaces inherited from class org.rhq.core.pc.agent.AgentService
AgentService.LifecycleState
 
Constructor Summary
SupportManager()
           
 
Method Summary
 InputStream getSnapshotReport(int resourceId, String name, String description)
           
protected  SupportFacet getSupportFacet(int resourceId, long facetMethodTimeout)
          Given a resource, this obtains that resource's SupportFacet interface.
 void initialize()
          Initializes the container service which will effectively tell the service to start doing its work.
 void setConfiguration(PluginContainerConfiguration configuration)
          Informs the container service how it should be configured by providing the full plugin container configuration.
 void shutdown()
          Stops the container service which effectively releases all runtime resources such as running threads.
 
Methods inherited from class org.rhq.core.pc.agent.AgentService
addLifecycleListener, getClientInterface, notifyLifecycleListenersOfNewState, remoteInputStream, remoteOutputStream, removeLifecycleListener, setAgentServiceStreamRemoter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SupportManager

public SupportManager()
Method Detail

setConfiguration

public void setConfiguration(PluginContainerConfiguration configuration)
Description copied from interface: ContainerService
Informs the container service how it should be configured by providing the full plugin container configuration. The plugin container will ensure it passes in a non-null configuration object so implementations of this interface should never have to worry about a null configuration parameter value.

Specified by:
setConfiguration in interface ContainerService

initialize

public void initialize()
Description copied from interface: ContainerService
Initializes the container service which will effectively tell the service to start doing its work. Implementations of this interface can be assured that prior to this method being called, a non-null configuration will be set via a call to ContainerService.setConfiguration(PluginContainerConfiguration).

Specified by:
initialize in interface ContainerService

shutdown

public void shutdown()
Description copied from interface: ContainerService
Stops the container service which effectively releases all runtime resources such as running threads.

Specified by:
shutdown in interface ContainerService

getSnapshotReport

public InputStream getSnapshotReport(int resourceId,
                                     String name,
                                     String description)
                              throws Exception
Specified by:
getSnapshotReport in interface SupportAgentService
Throws:
Exception

getSupportFacet

protected SupportFacet getSupportFacet(int resourceId,
                                       long facetMethodTimeout)
                                throws PluginContainerException
Given a resource, this obtains that resource's SupportFacet interface. If the resource does not support that facet, an exception is thrown. The resource must be in the STARTED (i.e. connected) state.

Parameters:
resourceId - identifies the resource that is to be snapshotted
Returns:
the resource's snapshot report facet component
Throws:
PluginContainerException - on error


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.