org.springframework.jmx.access

## 类 MBeanProxyFactoryBean

- java.lang.Object
- - org.springframework.jmx.access.MBeanClientInterceptor
  - - org.springframework.jmx.access.MBeanProxyFactoryBean

- 所有已实现的接口:
    org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<Object>, org.springframework.beans.factory.InitializingBean

      public class MBeanProxyFactoryBean
      extends MBeanClientInterceptor
      implements org.springframework.beans.factory.FactoryBean<Object>, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean

  Creates a proxy to a managed resource running either locally or remotely. The "proxyInterface" property defines the interface that the generated proxy is supposed to implement. This interface should define methods and properties that correspond to operations and attributes in the management interface of the resource you wish to proxy.

  There is no need for the managed resource to implement the proxy interface, although you may find it convenient to do. It is not required that every operation and attribute in the management interface is matched by a corresponding property or method in the proxy interface.

  Attempting to invoke or access any method or property on the proxy interface that does not correspond to the management interface will lead to an `InvalidInvocationException`.

  从以下版本开始:
    1.2
  作者:
    Rob Harrop, Juergen Hoeller
  另请参阅:
    `MBeanClientInterceptor`, `InvalidInvocationException`

- - ### 字段概要

    - ### 从类继承的字段 org.springframework.jmx.access.MBeanClientInterceptor

      `logger`

  - ### 构造器概要

    构造器
    构造器和说明
    `MBeanProxyFactoryBean()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `afterPropertiesSet()` Checks that the `proxyInterface` has been specified and then generates the proxy for the target MBean.
    `Object` | `getObject()`
    `Class<?>` | `getObjectType()`
    `boolean` | `isSingleton()`
    `void` | `setBeanClassLoader(ClassLoader classLoader)`
    `void` | `setProxyInterface(Class<?> proxyInterface)` Set the interface that the generated proxy will implement.

    - ### 从类继承的方法 org.springframework.jmx.access.MBeanClientInterceptor

      `convertResultValueIfNecessary, destroy, doInvoke, getEnvironment, getManagementInterface, handleConnectFailure, invoke, isPrepared, prepare, setAgentId, setConnectOnStartup, setEnvironment, setManagementInterface, setObjectName, setRefreshOnConnectFailure, setServer, setServiceUrl, setUseStrictCasing`

    - ### 从类继承的方法 java.lang.Object

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

- - ### 构造器详细资料

    - #### MBeanProxyFactoryBean

          public MBeanProxyFactoryBean()

  - ### 方法详细资料

    - #### setProxyInterface

          public void setProxyInterface(Class<?> proxyInterface)

      Set the interface that the generated proxy will implement.

      This will usually be a management interface that matches the target MBean, exposing bean property setters and getters for MBean attributes and conventional Java methods for MBean operations.

      另请参阅:
        `MBeanClientInterceptor.setObjectName(java.lang.Object)`

    - #### setBeanClassLoader

          public void setBeanClassLoader(ClassLoader classLoader)

      指定者:
        `setBeanClassLoader` 在接口中 `org.springframework.beans.factory.BeanClassLoaderAware`
      覆盖:
        `setBeanClassLoader` 在类中 `MBeanClientInterceptor`

    - #### afterPropertiesSet

          public void afterPropertiesSet()
                                  throws MBeanServerNotFoundException,
                                         MBeanInfoRetrievalException

      Checks that the `proxyInterface` has been specified and then generates the proxy for the target MBean.
      指定者:
        `afterPropertiesSet` 在接口中 `org.springframework.beans.factory.InitializingBean`
      覆盖:
        `afterPropertiesSet` 在类中 `MBeanClientInterceptor`
      抛出:
        `MBeanServerNotFoundException`
        `MBeanInfoRetrievalException`

    - #### getObject

          @Nullable
          public Object getObject()

      指定者:
        `getObject` 在接口中 `org.springframework.beans.factory.FactoryBean<Object>`

    - #### getObjectType

          public Class<?> getObjectType()

      指定者:
        `getObjectType` 在接口中 `org.springframework.beans.factory.FactoryBean<Object>`

    - #### isSingleton

          public boolean isSingleton()

      指定者:
        `isSingleton` 在接口中 `org.springframework.beans.factory.FactoryBean<Object>`