Class Client

java.lang.Object
org.apache.logging.log4j.jmx.gui.Client

public class Client extends Object
This class allows client-side code to perform operations on remote (server-side) MBeans via proxies.
  • Field Details

  • Constructor Details

  • Method Details

    • init

      private void init() throws MalformedObjectNameException, IOException
      Throws:
      MalformedObjectNameException
      IOException
    • find

      private Set<ObjectName> find(String pattern) throws JMException, IOException
      Throws:
      JMException
      IOException
    • getLoggerContextAdmins

      public List<LoggerContextAdminMBean> getLoggerContextAdmins() throws JMException, IOException
      Returns a list of proxies that allow operations to be performed on the remote LoggerContextAdminMBeans.
      Returns:
      a list of proxies to the remote LoggerContextAdminMBeans
      Throws:
      IOException - If an I/O error occurred
      JMException - If a management error occurred
    • getLoggerContextAdmin

      public LoggerContextAdminMBean getLoggerContextAdmin(ObjectName name)
    • close

      public void close()
      Closes the client connection to its server. Any ongoing or new requests to the MBeanServerConnection will fail.
    • getConnection

      public MBeanServerConnection getConnection()
      Returns the MBean server connection through which to communicate with the remote mbeans.
      Returns:
      the MBean server connection
    • getStatusLoggerAdmin

      public StatusLoggerAdminMBean getStatusLoggerAdmin(String contextName) throws MalformedObjectNameException, IOException
      Returns the StatusLoggerAdminMBean associated with the specified context name, or null.
      Parameters:
      contextName - search key
      Returns:
      StatusLoggerAdminMBean or null
      Throws:
      MalformedObjectNameException - If an object name is malformed
      IOException - If an I/O error occurred
    • isLoggerContext

      public boolean isLoggerContext(ObjectName mbeanName)
      Returns true if the specified ObjectName is for a LoggerContextAdminMBean, false otherwise.
      Parameters:
      mbeanName - the ObjectName to check.
      Returns:
      true if the specified ObjectName is for a LoggerContextAdminMBean, false otherwise
    • getStatusLoggerObjectName

      public ObjectName getStatusLoggerObjectName(ObjectName loggerContextObjName)
      Returns the ObjectName of the StatusLoggerAdminMBean associated with the specified LoggerContextAdminMBean.
      Parameters:
      loggerContextObjName - the ObjectName of a LoggerContextAdminMBean
      Returns:
      ObjectName of the StatusLoggerAdminMBean