|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.jbi.jmx.ConnectorServerFactoryBean
public class ConnectorServerFactoryBean
FactoryBean that creates a JSR-160 JMXConnectorServer,
optionally registers it with the MBeanServer and then starts it.
The JMXConnectorServer can be started in a separate thread by setting the
threaded property to true. You can configure this thread to be a
daemon thread by setting the daemon property to true.
This xbean-enabled factory is a wrapper on top of the existing Spring
factory bean. It also logs the serviceUrl when starting.
| Field Summary | |
|---|---|
static int |
REGISTRATION_FAIL_ON_EXISTING
Constant indicating that registration should fail when attempting to register an MBean under a name that already exists. |
static int |
REGISTRATION_IGNORE_EXISTING
Constant indicating that registration should ignore the affected MBean when attempting to register an MBean under a name that already exists. |
static int |
REGISTRATION_REPLACE_EXISTING
Constant indicating that registration should replace the affected MBean when attempting to register an MBean under a name that already exists. |
| Constructor Summary | |
|---|---|
ConnectorServerFactoryBean()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
Object |
getObject()
|
Class |
getObjectType()
|
boolean |
isSingleton()
|
void |
setDaemon(boolean daemon)
Set whether any threads started for the JMXConnectorServer should be
started as daemon threads. |
void |
setEnvironment(Map environment)
Set the environment properties used to construct the JMXConnector
as a Map of String keys and arbitrary Object values. |
void |
setObjectName(String objectName)
Set the ObjectName used to register the JMXConnectorServer
itself with the MBeanServer. |
void |
setRegistrationBehavior(int registrationBehavior)
Specify what action should be taken when attempting to register an MBean under an ObjectName that already exists. |
void |
setRegistrationBehaviorName(String behavior)
Set the registration behavior by the name of the corresponding constant, e.g. |
void |
setServer(MBeanServer server)
Specify the MBeanServer instance with which all beans should
be registered. |
void |
setServiceUrl(String serviceUrl)
Set the service URL for the JMXConnectorServer. |
void |
setThreaded(boolean threaded)
Set whether the JMXConnectorServer should be started in a separate thread. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int REGISTRATION_FAIL_ON_EXISTING
This is the default registration behavior.
public static final int REGISTRATION_IGNORE_EXISTING
public static final int REGISTRATION_REPLACE_EXISTING
| Constructor Detail |
|---|
public ConnectorServerFactoryBean()
| Method Detail |
|---|
public void setDaemon(boolean daemon)
JMXConnectorServer should be
started as daemon threads.
daemon - ConnectorServerFactoryBean.setDaemon(boolean)public void setEnvironment(Map environment)
JMXConnector
as a Map of String keys and arbitrary Object values.
environment - ConnectorServerFactoryBean.setEnvironmentMap(java.util.Map)
public void setObjectName(String objectName)
throws MalformedObjectNameException
ObjectName used to register the JMXConnectorServer
itself with the MBeanServer.
objectName -
MalformedObjectNameException - if the ObjectName is malformedorg.springframework.jmx.support.ConnectorServerFactoryBean#setObjectName(java.lang.String)public void setRegistrationBehavior(int registrationBehavior)
ObjectName that already exists.
Default is REGISTRATION_FAIL_ON_EXISTING.
registrationBehavior - setRegistrationBehaviorName(String),
REGISTRATION_FAIL_ON_EXISTING,
REGISTRATION_IGNORE_EXISTING,
REGISTRATION_REPLACE_EXISTING,
MBeanRegistrationSupport.setRegistrationBehavior(int)public void setRegistrationBehaviorName(String behavior)
behavior - setRegistrationBehavior(int),
REGISTRATION_FAIL_ON_EXISTING,
REGISTRATION_IGNORE_EXISTING,
REGISTRATION_REPLACE_EXISTING,
MBeanRegistrationSupport.setRegistrationBehaviorName(java.lang.String)public void setServer(MBeanServer server)
MBeanServer instance with which all beans should
be registered. The MBeanExporter will attempt to locate an
existing MBeanServer if none is supplied.
server - MBeanRegistrationSupport.setServer(javax.management.MBeanServer)public void setServiceUrl(String serviceUrl)
JMXConnectorServer.
serviceUrl - ConnectorServerFactoryBean.setServiceUrl(java.lang.String)public void setThreaded(boolean threaded)
JMXConnectorServer should be started in a separate thread.
threaded - ConnectorServerFactoryBean.setThreaded(boolean)
public Object getObject()
throws Exception
getObject in interface org.springframework.beans.factory.FactoryBeanExceptionpublic Class getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBeanpublic boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException
public void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||