public class AgentConfiguration extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AgentConfiguration.Builder
An
AgentConfiguration builder. |
static class |
AgentConfiguration.Source
Enumerates supported configuration sources and their precedence levels.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
static AgentConfiguration |
fromAnnotatedClass(Class<?> agentClass)
Parses the agent configuration by checking the
Agent annotation in the
specified class. |
String |
getClassName() |
static AgentConfiguration |
getHighestPrecedenceConfiguration(Collection<AgentConfiguration> agentConfigurations)
Returns the AgentConfiguration with the highest precedence level among the objects in
the specified
Collection. |
String |
getInterval() |
String |
getName() |
AgentConfiguration.Source |
getSource() |
AgentType |
getType() |
int |
hashCode() |
String |
toString()
Generates a string representation of this AgentConfiguration.
|
public String getName()
public AgentType getType()
public String getClassName()
public String getInterval()
public AgentConfiguration.Source getSource()
public static AgentConfiguration fromAnnotatedClass(Class<?> agentClass)
Agent annotation in the
specified class.agentClass - the class to be mappedAgentConfiguration mapped from the specified source classAgentConfigurationException - if the annotation is not present in the classpublic String toString()
public static AgentConfiguration getHighestPrecedenceConfiguration(Collection<AgentConfiguration> agentConfigurations)
Collection.
IMPORTANT: Although it is assumed that all agents contained in the specified collection have the same class name, this method performs no validation on this requirement. In other words, the object with higher precedence among the other ones will be returned regardless of any other agent attribute.
agentConfigurations - a collection of AgentConfiguration objects to be evaluatedIllegalArgumentException - if an empty or null collection is received, or the
specified collection does not contain at least one
non-null objectCopyright © 2021. All rights reserved.