public class BytemanAgentDiscoveryComponent extends Object implements ResourceDiscoveryComponent<BytemanAgentComponent>, ManualAddFacet<BytemanAgentComponent>, ClassLoaderFacet<BytemanAgentComponent>
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_BYTEMAN_ADDRESS |
static String |
DEFAULT_BYTEMAN_PORT |
static String |
PLUGIN_CONFIG_PROP_ADDRESS |
static String |
PLUGIN_CONFIG_PROP_CLIENT_JAR |
static String |
PLUGIN_CONFIG_PROP_PORT |
| Constructor and Description |
|---|
BytemanAgentDiscoveryComponent() |
| Modifier and Type | Method and Description |
|---|---|
DiscoveredResourceDetails |
discoverResource(org.rhq.core.domain.configuration.Configuration pluginConfiguration,
ResourceDiscoveryContext<BytemanAgentComponent> context) |
Set<DiscoveredResourceDetails> |
discoverResources(ResourceDiscoveryContext<BytemanAgentComponent> context) |
List<URL> |
getAdditionalClasspathUrls(ResourceDiscoveryContext<BytemanAgentComponent> context,
DiscoveredResourceDetails details) |
static String |
getJarAttribute(String jarPath,
String attributeName,
String defaultValue)
Static utility method that can extract a main attribute value from a given jar file's manifest.
|
protected String |
getVersion(String address,
String port,
String jarPath)
Tries to determine the version of the remote byteman agent.
|
public static final String DEFAULT_BYTEMAN_ADDRESS
public static final String DEFAULT_BYTEMAN_PORT
public static final String PLUGIN_CONFIG_PROP_ADDRESS
public static final String PLUGIN_CONFIG_PROP_PORT
public static final String PLUGIN_CONFIG_PROP_CLIENT_JAR
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<BytemanAgentComponent> context)
discoverResources in interface ResourceDiscoveryComponent<BytemanAgentComponent>public DiscoveredResourceDetails discoverResource(org.rhq.core.domain.configuration.Configuration pluginConfiguration, ResourceDiscoveryContext<BytemanAgentComponent> context) throws InvalidPluginConfigurationException
discoverResource in interface ManualAddFacet<BytemanAgentComponent>InvalidPluginConfigurationExceptionpublic List<URL> getAdditionalClasspathUrls(ResourceDiscoveryContext<BytemanAgentComponent> context, DiscoveredResourceDetails details) throws Exception
getAdditionalClasspathUrls in interface ClassLoaderFacet<BytemanAgentComponent>Exceptionprotected String getVersion(String address, String port, String jarPath)
address - the address of the remote byteman agent listenerport - the port that the remote byteman agent is listening tojarPath - the path to the byteman jar (which may be the client jar, or the core byteman jar)public static String getJarAttribute(String jarPath, String attributeName, String defaultValue)
jarPath - location of the jar fileattributeName - name of the main attribute to retrievedefaultValue - if the manifest doesn't have the attribute or the manifest itself doesn't exist, this is returnedCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.