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.
MBeanClientInterceptor, InvalidInvocationException
| Modifier and Type | Field and Description |
|---|---|
| private ClassLoader | |
| private Object | |
| private Class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Overrides org. Implements org. proxyInterface has been specified and then
generates the proxy for the target MBean.
|
| public Object | getObject()
Implements org. |
| public Class | getObjectType()
Implements org. null if not known in advance.
|
| public boolean | isSingleton()
Overrides default org. |
| public void | setBeanClassLoader(ClassLoader
the owning class loader classLoader)Overrides org. Implements org. class loader to
a bean instance.
|
| public void | setProxyInterface(Class<?> proxyInterface)
Set the interface that the generated proxy will implement. |
| beanClassLoader | back to summary |
|---|---|
| private ClassLoader beanClassLoader Hides org. | |
| mbeanProxy | back to summary |
|---|---|
| private Object mbeanProxy
| |
| proxyInterface | back to summary |
|---|---|
| private Class<?> proxyInterface
| |
| MBeanProxyFactoryBean | back to summary |
|---|---|
| public MBeanProxyFactoryBean() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() throws MBeanServerNotFoundException, MBeanInfoRetrievalException Overrides org. Implements org. Checks that the
| |
| getObject | back to summary |
|---|---|
| public Object getObject() Implements org. Doc from org. Return an instance (possibly shared or independent) of the object managed by this factory. As with a If this FactoryBean is not fully initialized yet at the time of
the call (for example because it is involved in a circular reference),
throw a corresponding As of Spring 2.0, FactoryBeans are allowed to return | |
| getObjectType | back to summary |
|---|---|
| public Class Implements org. Doc from org. Return the type of object that this FactoryBean creates,
or This allows one to check for specific types of beans without instantiating objects, for example on autowiring. In the case of implementations that are creating a singleton object, this method should try to avoid singleton creation as far as possible; it should rather estimate the type in advance. For prototypes, returning a meaningful type here is advisable too. This method can be called before this FactoryBean has been fully initialized. It must not rely on state created during initialization; of course, it can still use such state if available. Note Autowiring will simply ignore FactoryBeans that return
| |
| isSingleton | back to summary |
|---|---|
| public boolean isSingleton() Overrides default org. Doc from org. Is the object managed by this factory a singleton? That is,
will Note If a FactoryBean indicates to hold a singleton object,
the object returned from The singleton status of the FactoryBean itself will generally be provided by the owning BeanFactory; usually, it has to be defined as singleton there. Note This method returning The default implementation returns
| |
| setBeanClassLoader | back to summary |
|---|---|
| public void setBeanClassLoader(ClassLoader classLoader) Overrides org. Implements org. Doc from org. Callback that supplies the bean Invoked after the population of normal bean properties but
before an initialization callback such as
| |
| setProxyInterface | back to summary |
|---|---|
| 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.
| |