org.rhq.plugins.jbossas5
Class Ejb2BeanDiscoveryComponent

java.lang.Object
  extended by org.rhq.plugins.jbossas5.ManagedComponentDiscoveryComponent<AbstractManagedDeploymentComponent>
      extended by org.rhq.plugins.jbossas5.Ejb2BeanDiscoveryComponent
All Implemented Interfaces:
ResourceDiscoveryComponent<AbstractManagedDeploymentComponent>

public class Ejb2BeanDiscoveryComponent
extends ManagedComponentDiscoveryComponent<AbstractManagedDeploymentComponent>

A discovery component for EJB 1/2 beans.

Author:
Lukas Krejci

Constructor Summary
Ejb2BeanDiscoveryComponent()
           
 
Method Summary
protected  boolean accept(ResourceDiscoveryContext<AbstractManagedDeploymentComponent> discoveryContext, org.jboss.managed.api.ManagedComponent component)
          This method is called during ManagedComponentDiscoveryComponent.discoverResources(ResourceDiscoveryContext) to determine whether given component that has been found in the management view by this component's configured component type is applicable in the discovery context.
protected  String getResourceKey(org.jboss.managed.api.ManagedComponent component)
          Return the unique resource key for the component.
protected  String getResourceName(org.jboss.managed.api.ManagedComponent component)
          Subclasses can override this method if they don't want to use the ManagedComponent name as the initial Resource name.
 
Methods inherited from class org.rhq.plugins.jbossas5.ManagedComponentDiscoveryComponent
discoverResources, getComponentType, getResourceVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ejb2BeanDiscoveryComponent

public Ejb2BeanDiscoveryComponent()
Method Detail

getResourceKey

protected String getResourceKey(org.jboss.managed.api.ManagedComponent component)
Description copied from class: ManagedComponentDiscoveryComponent
Return the unique resource key for the component. If you override this method, make sure to override ManagedComponentComponent.getManagedComponent() method as well because the return value of this method is used as the component name (ManagedComponentComponent.getComponentName()).

Overrides:
getResourceKey in class ManagedComponentDiscoveryComponent<AbstractManagedDeploymentComponent>
Parameters:
component - the component to uniquely identify
Returns:
the unique identifier for the component

getResourceName

protected String getResourceName(org.jboss.managed.api.ManagedComponent component)
Description copied from class: ManagedComponentDiscoveryComponent
Subclasses can override this method if they don't want to use the ManagedComponent name as the initial Resource name.

Overrides:
getResourceName in class ManagedComponentDiscoveryComponent<AbstractManagedDeploymentComponent>
Parameters:
component - the ManagedComponent being discovered
Returns:
the name to be assigned to the corresponding Resource

accept

protected boolean accept(ResourceDiscoveryContext<AbstractManagedDeploymentComponent> discoveryContext,
                         org.jboss.managed.api.ManagedComponent component)
Description copied from class: ManagedComponentDiscoveryComponent
This method is called during ManagedComponentDiscoveryComponent.discoverResources(ResourceDiscoveryContext) to determine whether given component that has been found in the management view by this component's configured component type is applicable in the discovery context.

Because the Profile Service doesn't always provide the components in a hierarchy we present the resources we need this method to filter the components into their appropriate places.

This default implementation always returns true.

Overrides:
accept in class ManagedComponentDiscoveryComponent<AbstractManagedDeploymentComponent>
Parameters:
discoveryContext - the current discovery context
component - the discovered component
Returns:
true if the component logically belongs in the context, false otherwise.


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