org.rhq.plugins.perftest.resource
Class SimpleResourceFactory

java.lang.Object
  extended by org.rhq.plugins.perftest.resource.SimpleResourceFactory
All Implemented Interfaces:
ResourceFactory

public class SimpleResourceFactory
extends Object
implements ResourceFactory

Simplistic resource factory, this class will simply return the number of resource specified. The resource key and resource name will be generated incrementally based on a counter. Currently, subsequent calls to this factory will result in the same set of resources returned.

Author:
Jason Dobies

Constructor Summary
SimpleResourceFactory(SimpleResourceGenerator generator)
           
 
Method Summary
 Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context)
          Simulates a discovery of resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleResourceFactory

public SimpleResourceFactory(SimpleResourceGenerator generator)
Method Detail

discoverResources

public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context)
Description copied from interface: ResourceFactory
Simulates a discovery of resources. The actual resources returned depend on the actual implementation's algorithm.

Specified by:
discoverResources in interface ResourceFactory
Parameters:
context - passed to the component's discovery call
Returns:
resources discovered from this call


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