CollectedInfo (Apache Tomcat 10.1.57 API Documentation)
Description: declaration: package: org.apache.catalina.ha.backend, class: CollectedInfo

# Class CollectedInfo

java.lang.Object
org.apache.catalina.ha.backend.CollectedInfo

public class CollectedInfo extends Object
Collected information class.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected MBeanServer`
  `mBeanServer`
  The MBean server used to collect information.
  `protected ObjectName`
  `objName`
  The object name of the thread pool MBean.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CollectedInfo(String host, int port)`
  Creates a new CollectedInfo instance and initializes it with the specified host and port.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `init(String host, int port)`
  Initializes the collected info by looking up the thread pool MBean for the given host and port.
  `void`
  `refresh()`
  Refreshes the ready and busy thread counts from the thread pool MBean.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### mBeanServer

    protected MBeanServer mBeanServer
    The MBean server used to collect information.

  - ### objName

    protected ObjectName objName
    The object name of the thread pool MBean.

- ## Constructor Details

  - ### CollectedInfo

    public CollectedInfo(String host, int port) throws Exception
    Creates a new CollectedInfo instance and initializes it with the specified host and port.
    Parameters:
      `host` - the host
      `port` - the port
    Throws:
      `Exception` - if initialization fails

- ## Method Details

  - ### init

    public void init(String host, int port) throws Exception
    Initializes the collected info by looking up the thread pool MBean for the given host and port.
    Parameters:
      `host` - the host (may be null to match any host)
      `port` - the port (0 to match any port)
    Throws:
      `Exception` - if no matching connector is found

  - ### refresh

    public void refresh() throws Exception
    Refreshes the ready and busy thread counts from the thread pool MBean.
    Throws:
      `Exception` - if not initialized or MBean access fails