Interface JavaProcessMonitorMBean

All Superinterfaces:
SelfEmailingMBean
All Known Subinterfaces:
ServletEngineMonitorMBean
All Known Implementing Classes:
JavaProcessMonitor

public interface JavaProcessMonitorMBean extends SelfEmailingMBean
MBean interface for registering and monitoring a set of generic Java processes.

Supported API: true

Extendable: true
  • Field Details

    • PROCESS_ADDED_NOTIF

      static final String PROCESS_ADDED_NOTIF
      Type of notification produced when process has been registered

      Supported API: true
    • PROCESS_REMOVED_NOTIF

      static final String PROCESS_REMOVED_NOTIF
      Type of notification produced when process has been deregistered

      Supported API: true
  • Method Details

    • getPingIntervalSeconds

      int getPingIntervalSeconds()
      Number of seconds between pings of registered processes

      Supported API: true
    • setPingIntervalSeconds

      void setPingIntervalSeconds(int pingIntervalSeconds)
      Number of seconds between pings of registered processes

      Supported API: true
    • getProcessInfos

      TabularData getProcessInfos() throws OpenDataException
      Some basic data on each registered process

      Supported API: true
      Throws:
      OpenDataException
    • getAttributesFromProcess

      @MBeanOperationImpact(0) AttributeList getAttributesFromProcess(String jvmName, ObjectName mbean, String[] attributeNames) throws Exception
      Get attribute values from an MBean in a registered JVM.

      Supported API: true
      Parameters:
      jvmName - Registered JVM to target
      mbean - ObjectName of target MBean
      attributeNames - Names of attributes to fetch values for
      Throws:
      Exception
    • getAttributesFromProcesses

      @MBeanOperationImpact(0) Map<String,Object> getAttributesFromProcesses(ObjectName mbean, String[] attributeNames)
      Get attribute values from an MBean in all registered processes. Results (which will be AttributeLists) and exceptions are both returned in a map by process JVM name.

      Supported API: true
      Parameters:
      mbean - ObjectName of target MBean
      attributeNames - Names of attributes to fetch values for
    • setAttributesInProcess

      @MBeanOperationImpact(1) AttributeList setAttributesInProcess(String jvmName, ObjectName mbean, AttributeList attributes) throws Exception
      Set attributes on an MBean in a registered JVM.

      Supported API: true
      Parameters:
      jvmName - Registered JVM to target
      mbean - ObjectName of target MBean
      attributes - Attribute settings to apply
      Throws:
      Exception
    • setAttributesInProcesses

      @MBeanOperationImpact(1) Map<String,Object> setAttributesInProcesses(ObjectName mbean, AttributeList attributes)
      Set attributes on an MBean in all registered processes. Results (which will be AttributeLists) and exceptions are both returned in a map by process JVM name.

      Supported API: true
      Parameters:
      mbean - ObjectName of target MBean
      attributes - Attribute settings to apply
    • invokeInProcess

      @MBeanOperationImpact(1) Object invokeInProcess(String jvmName, ObjectName mbean, String operation, Object[] params, String[] signature) throws Exception
      Invoke an operation on an MBean in a registered JVM.

      Supported API: true
      Parameters:
      jvmName - Registered JVM to target
      mbean - ObjectName of target MBean
      operation - Name of target operation
      params - Arguments of target operation
      signature - Signature of target operation
      Throws:
      Exception
    • invokeInProcesses

      @MBeanOperationImpact(1) Map<String,Object> invokeInProcesses(ObjectName mbean, String operation, Object[] params, String[] signature)
      Invoke an operation on an MBean in all registered processes. Results and exceptions are both returned in a map by process JVM name.

      Supported API: true
      Parameters:
      mbean - ObjectName of target MBean
      operation - Name of target operation
      params - Arguments of target operation
      signature - Signature of target operation
    • invokeInfoOpInProcess

      @MBeanOperationImpact(0) Object invokeInfoOpInProcess(String jvmName, ObjectName dumperMBeanName, ObjectName mbean, String operation, Object[] params, String[] signature) throws Exception
      Invoke an operation with an INFO (read-only) impact on an MBean in a registered JVM.

      Supported API: true
      Parameters:
      jvmName - Registered JVM to target
      dumperMBeanName - ObjectName of Dumper MBean, through which the operation on the target MBean will be invoked
      mbean - ObjectName of target MBean
      operation - Name of target operation
      params - Arguments of target operation
      signature - Signature of target operation
      Throws:
      Exception
    • invokeInfoOpInProcesses

      @MBeanOperationImpact(0) Map<String,Object> invokeInfoOpInProcesses(ObjectName dumperMBeanName, ObjectName mbean, String operation, Object[] params, String[] signature)
      Invoke an operation with an INFO (read-only) impact on an MBean in all registered processes. Results and exceptions are both returned in a map by process JVM name. If the target operation is found to have a non-INFO impact for a given MBean, the operation will not be invoked on that MBean and an exception will be returned in the map for this MBean.

      Supported API: true
      Parameters:
      dumperMBeanName - ObjectName of Dumper MBean, through which the operation on the target MBean will be invoked
      mbean - ObjectName of target MBean
      operation - Name of target operation
      params - Arguments of target operation
      signature - Signature of target operation
    • registerProcess

      @Deprecated @MBeanOperationImpact(1) void registerProcess(String jvmName, String localJmxUrl, String remoteJmxUrl) throws Exception
      Deprecated.
      Register a process with this MBean; may throw an exception when accessed from an untrusted client.

      Same as registerProcess(java.lang.String, long, java.lang.String, java.lang.String) except that the current time is used for the startTime parameter since no start time was provided. This operation is provided for backwards compatibility only.

      Supported API: true

      Parameters:
      jvmName - Name of JVM process
      localJmxUrl - JMX URL through which this MBean can contact the Java process (without having to authenticate)
      remoteJmxUrl - JMX URL this MBean will expose via its ProcessInfos attribute for use by remote clients; may (and generally should) require authentication; also may be null
      Throws:
      Exception
    • registerProcess

      @MBeanOperationImpact(1) void registerProcess(String jvmName, long startTime, String localJmxUrl, String remoteJmxUrl) throws Exception
      Register a process with this MBean; may throw an exception when accessed from an untrusted client.

      Supported API: true
      Parameters:
      jvmName - Name of JVM process
      startTime - Start time of JVM process as long as per System.currentTimeMillis()
      localJmxUrl - JMX URL through which this MBean can contact the Java process (without having to authenticate)
      remoteJmxUrl - JMX URL this MBean will expose via its ProcessInfos attribute for use by remote clients; may (and generally should) require authentication; also may be null
      Throws:
      Exception