Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.logging.log4j.jmx.gui
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.

Constructor Summary
`Client(JMXConnector connector)` Constructs a new `Client` object and creates proxies for all known remote MBeans.
`Client(MBeanServerConnection mBeanServerConnection)` Constructs a new `Client` object and creates proxies for all known remote MBeans.

Method Summary
`void` | `close()` Closes the client connection to its server.
`MBeanServerConnection` | `getConnection()` Returns the MBean server connection through which to communicate with the remote mbeans.
`org.apache.logging.log4j.core.jmx.LoggerContextAdminMBean` | `getLoggerContextAdmin(ObjectName name)`
`List<org.apache.logging.log4j.core.jmx.LoggerContextAdminMBean>` | `getLoggerContextAdmins()` Returns a list of proxies that allow operations to be performed on the remote `LoggerContextAdminMBean`s.
`org.apache.logging.log4j.core.jmx.StatusLoggerAdminMBean` | `getStatusLoggerAdmin(String contextName)` Returns the `StatusLoggerAdminMBean` associated with the specified context name, or `null`.
`ObjectName` | `getStatusLoggerObjectName(ObjectName loggerContextObjName)` Returns the `ObjectName` of the `StatusLoggerAdminMBean` associated with the specified `LoggerContextAdminMBean`.
`boolean` | `isLoggerContext(ObjectName mbeanName)` Returns `true` if the specified `ObjectName` is for a `LoggerContextAdminMBean`, `false` otherwise.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Client

    public Client(JMXConnector connector)
           throws MalformedObjectNameException,
                  IOException

  Constructs a new `Client` object and creates proxies for all known remote MBeans.

  Parameters:
    `connector` - used to create the MBean server connection through which to communicate with the remote mbeans
  Throws:
    `MalformedObjectNameException` - if a problem occurred identifying one of the remote mbeans
    `IOException` - if the connection failed

### Client

    public Client(MBeanServerConnection mBeanServerConnection)
           throws MalformedObjectNameException,
                  IOException

  Constructs a new `Client` object and creates proxies for all known remote MBeans.

  Parameters:
    `mBeanServerConnection` - the MBean server connection through which to communicate with the remote mbeans
  Throws:
    `MalformedObjectNameException` - if a problem occurred identifying one of the remote mbeans
    `IOException` - if the connection failed

Method Detail

### getLoggerContextAdmins

    public List<org.apache.logging.log4j.core.jmx.LoggerContextAdminMBean> getLoggerContextAdmins()
                                                                                           throws JMException,
                                                                                                  IOException

  Returns a list of proxies that allow operations to be performed on the remote `LoggerContextAdminMBean`s.

  Returns:
    a list of proxies to the remote `LoggerContextAdminMBean`s
  Throws:
    `IOException` - If an I/O error occurred
    `JMException` - If a management error occurred

### getLoggerContextAdmin

    public org.apache.logging.log4j.core.jmx.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 org.apache.logging.log4j.core.jmx.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`

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.