FactoryBean that obtains a javax.management.MBeanServer reference
through the standard JMX 1.2 javax.management.MBeanServerFactory
API.
Exposes the MBeanServer for bean references.
By default, MBeanServerFactoryBean will always create
a new MBeanServer even if one is already running. To have
the MBeanServerFactoryBean attempt to locate a running
MBeanServer first, set the value of the
"locateExistingServerIfPossible" property to "true".
setLocateExistingServerIfPossible, locateMBeanServer, javax.management.MBeanServer , javax.management.MBeanServerFactory#findMBeanServer , javax.management.MBeanServerFactory#createMBeanServer , javax.management.MBeanServerFactory#newMBeanServer , MBeanServerConnectionFactoryBean, ConnectorServerFactoryBean
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private String | |
| private boolean | |
| protected final Log | |
| private boolean | |
| private boolean | |
| private MBeanServer |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. MBeanServer instance.
|
| protected MBeanServer | createMBeanServer(String
the default domain, or defaultDomain, boolean null if nonewhether to register the registerWithFactory)MBeanServer
with the MBeanServerFactoryCreate a new |
| public void | destroy()
Implements org. MBeanServer instance, if necessary.
|
| public MBeanServer | getObject()
Implements org. |
| public Class | getObjectType()
Implements org. null if not known in advance.
|
| public boolean | isSingleton()
Overrides default org. |
| protected MBeanServer | Returns: theMBeanServer if foundthe agent identifier of the MBeanServer to retrieve.
If this parameter is agentId)null, all registered MBeanServers are
considered.Attempt to locate an existing |
| public void | |
| public void | setDefaultDomain(String defaultDomain)
Set the default domain to be used by the |
| public void | setLocateExistingServerIfPossible(boolean locateExistingServerIfPossible)
Set whether the |
| public void | setRegisterWithFactory(boolean registerWithFactory)
Set whether to register the |
| agentId | back to summary |
|---|---|
| private String agentId
| |
| defaultDomain | back to summary |
|---|---|
| private String defaultDomain
| |
| locateExistingServerIfPossible | back to summary |
|---|---|
| private boolean locateExistingServerIfPossible | |
| logger | back to summary |
|---|---|
| protected final Log logger | |
| newlyRegistered | back to summary |
|---|---|
| private boolean newlyRegistered | |
| registerWithFactory | back to summary |
|---|---|
| private boolean registerWithFactory | |
| server | back to summary |
|---|---|
| private MBeanServer server
| |
| MBeanServerFactoryBean | back to summary |
|---|---|
| public MBeanServerFactoryBean() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() throws MBeanServerNotFoundException Implements org. Creates the
| |
| createMBeanServer | back to summary |
|---|---|
| protected MBeanServer createMBeanServer(String defaultDomain, boolean registerWithFactory) Create a new
| |
| destroy | back to summary |
|---|---|
| public void destroy() Implements org. Unregisters the
| |
| getObject | back to summary |
|---|---|
| public MBeanServer 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
| |
| locateMBeanServer | back to summary |
|---|---|
| protected MBeanServer locateMBeanServer(String agentId) throws MBeanServerNotFoundException Attempt to locate an existing The default implementation attempts to find an
| |
| setAgentId | back to summary |
|---|---|
| public void setAgentId(String agentId) Set the agent id of the Default is none. If specified, this will result in an automatic attempt being made to locate the attendant MBeanServer, and (importantly) if said MBeanServer cannot be located no attempt will be made to create a new MBeanServer (and an MBeanServerNotFoundException will be thrown at resolution time). Specifying the empty String indicates the platform MBeanServer. | |
| setDefaultDomain | back to summary |
|---|---|
| public void setDefaultDomain(String defaultDomain) Set the default domain to be used by the Default is none. | |
| setLocateExistingServerIfPossible | back to summary |
|---|---|
| public void setLocateExistingServerIfPossible(boolean locateExistingServerIfPossible) Set whether the Default is | |
| setRegisterWithFactory | back to summary |
|---|---|
| public void setRegisterWithFactory(boolean registerWithFactory) Set whether to register the Default is | |