public abstract class AbstractJmxAgent extends AbstractAgent
AbstractJmxAgent
registers Mule Jmx management beans with an MBean server.Modifier and Type | Class and Description |
---|---|
protected class |
AbstractJmxAgent.MuleContextStartedListener |
protected class |
AbstractJmxAgent.MuleContextStoppedListener |
Modifier and Type | Field and Description |
---|---|
protected boolean |
containerMode |
static Map<String,String> |
DEFAULT_CONNECTOR_SERVER_PROPERTIES |
static String |
DEFAULT_JMX_AUTHENTICATOR
Default JMX Authenticator to use for securing remote access.
|
static String |
DEFAULT_REMOTING_URI |
protected boolean |
locateServer
Should MBeanServer be discovered.
|
protected static Log |
logger
Logger used by this class
|
static String |
NAME |
muleContext, name
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
AbstractJmxAgent() |
Modifier and Type | Method and Description |
---|---|
protected String |
buildFullyQualifiedEndpointName(EndpointServiceMBean mBean,
Connector connector) |
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
Map<String,Object> |
getConnectorServerProperties() |
String |
getConnectorServerUrl() |
String |
getDescription()
A description of the agent that gets displayed in the splash
screen when the Mule Context starts up.
|
ConfigurableJMXAuthenticator |
getJmxAuthenticator() |
JmxSupportFactory |
getJmxSupportFactory() |
MBeanServer |
getMBeanServer() |
Registry |
getRmiRegistry() |
void |
initialise()
Method used to perform any initialisation work.
|
protected void |
initRMI() |
boolean |
isCreateRmiRegistry() |
boolean |
isCreateServer() |
boolean |
isEnableStatistics() |
boolean |
isLocateServer() |
protected void |
registerApplicationServices() |
protected void |
registerConfigurationService() |
protected void |
registerConnectorServices() |
protected void |
registerEndpointServices() |
protected void |
registerFlowConstructServices() |
protected void |
registerModelServices() |
protected void |
registerMuleService() |
protected abstract void |
registerServices() |
protected void |
registerServiceServices() |
protected void |
registerStatisticsService() |
protected void |
registerWrapperService()
Register a Java Service Wrapper agent.
|
void |
setConnectorServerProperties(Map<String,Object> connectorServerProperties)
Setter for property 'connectorServerProperties'.
|
void |
setConnectorServerUrl(String connectorServerUrl) |
void |
setCreateRmiRegistry(boolean createRmiRegistry) |
void |
setCreateServer(boolean createServer) |
void |
setCredentials(Map<String,String> newCredentials)
Setter for property 'credentials'.
|
void |
setEnableStatistics(boolean enableStatistics) |
void |
setJmxAuthenticator(ConfigurableJMXAuthenticator jmxAuthenticator) |
void |
setJmxSupportFactory(JmxSupportFactory jmxSupportFactory) |
void |
setLocateServer(boolean locateServer) |
void |
setMBeanServer(MBeanServer mBeanServer) |
void |
setRmiRegistry(Registry rmiRegistry) |
void |
start() |
void |
stop() |
protected void |
unregisterMBeansIfNecessary() |
protected void |
unregisterMBeansIfNecessary(boolean containerMode) |
getName, setMuleContext, setName, unregisterMeQuietly
public static final String NAME
public static final String DEFAULT_REMOTING_URI
public static final Map<String,String> DEFAULT_CONNECTOR_SERVER_PROPERTIES
public static final String DEFAULT_JMX_AUTHENTICATOR
protected static final Log logger
protected boolean locateServer
protected boolean containerMode
public String getDescription()
Agent
getDescription
in interface Agent
getDescription
in class AbstractAgent
public void initialise() throws InitialisationException
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered frompublic void start() throws MuleException
MuleException
public void stop() throws MuleException
MuleException
public void dispose()
protected void registerWrapperService() throws MuleException
MuleException
- if registration failedprotected void registerStatisticsService() throws NotCompliantMBeanException, MBeanRegistrationException, InstanceAlreadyExistsException, MalformedObjectNameException
protected void registerModelServices() throws NotCompliantMBeanException, MBeanRegistrationException, InstanceAlreadyExistsException, MalformedObjectNameException
protected void registerMuleService() throws NotCompliantMBeanException, MBeanRegistrationException, InstanceAlreadyExistsException, MalformedObjectNameException
protected void registerConfigurationService() throws NotCompliantMBeanException, MBeanRegistrationException, InstanceAlreadyExistsException, MalformedObjectNameException
protected void registerServiceServices() throws NotCompliantMBeanException, MBeanRegistrationException, InstanceAlreadyExistsException, MalformedObjectNameException
protected void registerFlowConstructServices() throws NotCompliantMBeanException, MBeanRegistrationException, InstanceAlreadyExistsException, MalformedObjectNameException
protected void registerApplicationServices() throws NotCompliantMBeanException, MBeanRegistrationException, InstanceAlreadyExistsException, MalformedObjectNameException
protected void registerEndpointServices() throws NotCompliantMBeanException, MBeanRegistrationException, InstanceAlreadyExistsException, MalformedObjectNameException
protected String buildFullyQualifiedEndpointName(EndpointServiceMBean mBean, Connector connector)
protected void registerConnectorServices() throws MalformedObjectNameException, NotCompliantMBeanException, MBeanRegistrationException, InstanceAlreadyExistsException
public boolean isCreateServer()
public void setCreateServer(boolean createServer)
public boolean isLocateServer()
public void setLocateServer(boolean locateServer)
public String getConnectorServerUrl()
public void setConnectorServerUrl(String connectorServerUrl)
public boolean isEnableStatistics()
public void setEnableStatistics(boolean enableStatistics)
public MBeanServer getMBeanServer()
public void setMBeanServer(MBeanServer mBeanServer)
public void setConnectorServerProperties(Map<String,Object> connectorServerProperties)
null
to use defaults (DEFAULT_CONNECTOR_SERVER_PROPERTIES
). Pass in an empty map to use no parameters.
Passing a non-empty map will replace defaults.connectorServerProperties
- Value to set for property 'connectorServerProperties'.public JmxSupportFactory getJmxSupportFactory()
public void setJmxSupportFactory(JmxSupportFactory jmxSupportFactory)
public void setCredentials(Map<String,String> newCredentials)
newCredentials
- Value to set for property 'credentials'.protected void unregisterMBeansIfNecessary()
protected void unregisterMBeansIfNecessary(boolean containerMode)
containerMode
- when true, MuleContext will still be exposed to enable the 'start' operationpublic Registry getRmiRegistry()
public void setRmiRegistry(Registry rmiRegistry)
public boolean isCreateRmiRegistry()
public void setCreateRmiRegistry(boolean createRmiRegistry)
protected abstract void registerServices() throws MuleException, NotCompliantMBeanException, MBeanRegistrationException, InstanceAlreadyExistsException, MalformedObjectNameException
public ConfigurableJMXAuthenticator getJmxAuthenticator()
public void setJmxAuthenticator(ConfigurableJMXAuthenticator jmxAuthenticator)
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.