Class JmxRemoteComponent
- java.lang.Object
-
- com.adaptris.core.management.MgmtComponentImpl
-
- com.adaptris.core.management.jmx.JmxRemoteComponent
-
- All Implemented Interfaces:
ManagementComponent
public class JmxRemoteComponent extends MgmtComponentImpl
Implementation of theManagementComponentinterface for JSR160.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCFG_KEY_JMX_SERVICE_URL_OBJECT_NAMEBootstrap property key that defines the optional object namestatic java.lang.StringDEFAULT_JMX_OBJECT_NAMEThe default object name "com.adaptris:type=JmxConnectorServer"static java.lang.StringJMX_JMXMP_SASL_PASSWORDBootstrap property that controls the password required for connecting to thisJMXConnectorServerif theJMXServiceURLindicates the jmxmp protocol.static java.lang.StringJMX_JMXMP_SASL_USERNAMEBootstrap property that controls the username required for connecting to thisJMXConnectorServerif theJMXServiceURLindicates the jmxmp protocol.static java.lang.StringJMX_SERVICE_URL_ENV_PREFIXBootstrap property key prefix that controls what environment is passed through to the JMXConnectorServer.-
Fields inherited from class com.adaptris.core.management.MgmtComponentImpl
log
-
-
Constructor Summary
Constructors Constructor Description JmxRemoteComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.adaptris.core.management.jmx.JmxComponentImpl.JmxComponentcreateJmxWrapper(java.util.Properties config)Create a JMX wrapper.voiddestroy()Destroy the management component making it require re-initialisation.voidinit(java.util.Properties p)Initialise the management component.booleanisStarted()voidstart()Start the management component.voidstop()Stop the management component.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.management.ManagementComponent
setClassLoader
-
-
-
-
Field Detail
-
CFG_KEY_JMX_SERVICE_URL_OBJECT_NAME
public static final java.lang.String CFG_KEY_JMX_SERVICE_URL_OBJECT_NAME
Bootstrap property key that defines the optional object nameIf "jmxserviceurl.objectname" is not defined then the default object name will be used, otherwise the value of the property key will be used as the objectname, so make it conforms to the standard
ObjectNamespecification.- See Also:
DEFAULT_JMX_OBJECT_NAME, Constant Field Values
-
JMX_SERVICE_URL_ENV_PREFIX
public static final java.lang.String JMX_SERVICE_URL_ENV_PREFIX
Bootstrap property key prefix that controls what environment is passed through to the JMXConnectorServer.Each property that matches the prefix of "jmxserviceurl.env." is passed through to the JMXConnectorServer as part of its environment (minus the prefix); if you need specific configuration for the JMXConnectorServer then this is how you would do it. e.g. The presence of the property
jmxserviceurl.env.myEnvironment=ABCDEwould cause an environment containingmyEnvironment=ABCDEto be passed through toJMXConnectorServerFactory.newJMXConnectorServer(JMXServiceURL, Map, MBeanServer). Obviously due to the inherent restrictions on properties, the environment will be the equivalent to aMap<String, String>- See Also:
JMXConnectorServerFactory.newJMXConnectorServer(JMXServiceURL, Map, MBeanServer), Constant Field Values
-
JMX_JMXMP_SASL_USERNAME
public static final java.lang.String JMX_JMXMP_SASL_USERNAME
Bootstrap property that controls the username required for connecting to thisJMXConnectorServerif theJMXServiceURLindicates the jmxmp protocol.If no
jmx.remote.profilessetting is specified thenSASL/PLAINis used. Different profiles may be specified according to the Oracle JDMK tutorial. Specifying a profile of TLS may require additionaljavax.net.ssl.*system properties.- See Also:
- Constant Field Values
-
JMX_JMXMP_SASL_PASSWORD
public static final java.lang.String JMX_JMXMP_SASL_PASSWORD
Bootstrap property that controls the password required for connecting to thisJMXConnectorServerif theJMXServiceURLindicates the jmxmp protocol.If no
jmx.remote.profilessetting is specified thenSASL/PLAINis used. Different profiles may be specified according to the Oracle JDMK tutorial. Specifying a profile of TLS may require additionaljavax.net.ssl.*system properties.- See Also:
- Constant Field Values
-
DEFAULT_JMX_OBJECT_NAME
public static final java.lang.String DEFAULT_JMX_OBJECT_NAME
The default object name "com.adaptris:type=JmxConnectorServer"- See Also:
- Constant Field Values
-
-
Method Detail
-
createJmxWrapper
protected com.adaptris.core.management.jmx.JmxComponentImpl.JmxComponent createJmxWrapper(java.util.Properties config) throws java.lang.ExceptionCreate a JMX wrapper.- Parameters:
config- the properties- Returns:
- null or something that can start/stop/register itself.
- Throws:
java.lang.Exception
-
init
public final void init(java.util.Properties p) throws java.lang.ExceptionDescription copied from interface:ManagementComponentInitialise the management component.- Parameters:
p- configuration properties that have been built during bootstrap.- Throws:
java.lang.Exception- if initialisation fails.
-
start
public final void start() throws java.lang.ExceptionDescription copied from interface:ManagementComponentStart the management component.- Throws:
java.lang.Exception
-
stop
public final void stop() throws java.lang.ExceptionDescription copied from interface:ManagementComponentStop the management component.- Throws:
java.lang.Exception
-
destroy
public final void destroy() throws java.lang.ExceptionDescription copied from interface:ManagementComponentDestroy the management component making it require re-initialisation.- Throws:
java.lang.Exception
-
isStarted
public boolean isStarted()
-
-