Package org.openjdk.jmc.agent.jmx
Class AgentController
- java.lang.Object
-
- org.openjdk.jmc.agent.jmx.AgentController
-
- All Implemented Interfaces:
AgentControllerMXBean
public class AgentController extends java.lang.Object implements AgentControllerMXBean
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.instrument.Instrumentation
instrumentation
private static java.util.logging.Logger
logger
private TransformRegistry
registry
-
Constructor Summary
Constructors Constructor Description AgentController(java.lang.instrument.Instrumentation instrumentation, TransformRegistry registry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkSecurity()
void
defineEventProbes(java.lang.String xmlDescription)
Reverts all existing instrumentation and then defines a new set of event probes to transform.private java.lang.Class<?>[]
retransformClasses(java.util.Set<java.lang.String> classNames)
JFRTransformDescriptor[]
retrieveCurrentTransforms()
java.lang.String
retrieveEventProbes()
Returns the most recent XML configuration that was successfully applied.
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
instrumentation
private final java.lang.instrument.Instrumentation instrumentation
-
registry
private final TransformRegistry registry
-
-
Constructor Detail
-
AgentController
public AgentController(java.lang.instrument.Instrumentation instrumentation, TransformRegistry registry)
-
-
Method Detail
-
defineEventProbes
public void defineEventProbes(java.lang.String xmlDescription) throws java.lang.Exception
Description copied from interface:AgentControllerMXBean
Reverts all existing instrumentation and then defines a new set of event probes to transform.- Specified by:
defineEventProbes
in interfaceAgentControllerMXBean
- Parameters:
xmlDescription
- the XML snippet describing event probes to transform.- Throws:
java.lang.Exception
- thrown when an event probe's specified class can not be retransformed.
-
retransformClasses
private java.lang.Class<?>[] retransformClasses(java.util.Set<java.lang.String> classNames)
-
retrieveCurrentTransforms
public JFRTransformDescriptor[] retrieveCurrentTransforms()
- Specified by:
retrieveCurrentTransforms
in interfaceAgentControllerMXBean
-
retrieveEventProbes
public java.lang.String retrieveEventProbes()
Description copied from interface:AgentControllerMXBean
Returns the most recent XML configuration that was successfully applied.- Specified by:
retrieveEventProbes
in interfaceAgentControllerMXBean
- Returns:
- an XML snippet of the current configuration.
-
checkSecurity
private void checkSecurity()
-
-