Interface ClasspathAgentMBean

All Superinterfaces:
Serializable
All Known Implementing Classes:
ClasspathAgent

public interface ClasspathAgentMBean extends Serializable
This is the MBean for the ClasspathAgent to be able to register this class for a JMX console like jconsole or visualvm. Originally this interface was part of patterntesting-agent.
Author:
oliver
  • Method Details

    • isActive

      boolean isActive()
      Checks if agent is active. This is true if this class here was started as Java agent.
      Returns:
      true, if started as Java agent
    • getArgs

      String getArgs()
      Get the arguments from the call as agent.
      Returns:
      the args
    • getLoadedClasses

      Class<?>[] getLoadedClasses()
      Returns the classes which were loaded by the classloader. NOTE: Although the 'jconsole' displays the classes as 'unavailable' do not remove it. It is needed by the ClasspathDigger class in PatternTesting Runtime to get the loaded classes.
      Returns:
      the classes as string array
    • getLoadedClassnames

      String[] getLoadedClassnames()
      Returns the classes which were loaded by the classloader. The loaded packages are returned as string array so that it can be displayed by the 'jconsole'.
      Returns:
      the classnames as string array
    • getLoadedClasses

      Class<?>[] getLoadedClasses(ClassLoader classloader)
      Gets the loaded classes.
      Parameters:
      classloader - the classloader
      Returns:
      the loaded classes
    • logLoadedClasses

      void logLoadedClasses()
      Prints the loaded classes to the log output.
      Since:
      1.5
    • dumpLoadedClasses

      File dumpLoadedClasses() throws IOException
      This operation dumps the loaded classes to a temporary file with the prefix "dumpLoadedClasses" and the extension ".txt". To be able to see the name of the temporary file in the 'jconsole' it should be returned as value.
      Returns:
      the temporary file
      Throws:
      IOException - Signals that an I/O exception has occurred.
      Since:
      1.5
    • dumpLoadedClasses

      void dumpLoadedClasses(String filename) throws IOException
      This operation dumps the loaded classes to the given file.
      Parameters:
      filename - the file where the classes are dumped to.
      Throws:
      IOException - Signals that an I/O exception has occurred.
      Since:
      1.5