public class EndpointMBeanExporter extends MBeanExporter implements SmartLifecycle, ApplicationContextAware
SmartLifecycle
bean that registers all known Endpoint
s with an
MBeanServer
using the MBeanExporter
located from the application
context.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_DOMAIN
The default JMX domain.
|
AUTODETECT_ALL, AUTODETECT_ASSEMBLER, AUTODETECT_MBEAN, AUTODETECT_NONE
REGISTRATION_FAIL_ON_EXISTING, REGISTRATION_IGNORE_EXISTING, REGISTRATION_REPLACE_EXISTING, server
Constructor and Description |
---|
EndpointMBeanExporter()
Create a new
EndpointMBeanExporter instance. |
EndpointMBeanExporter(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Create a new
EndpointMBeanExporter instance. |
Modifier and Type | Method and Description |
---|---|
protected JmxEndpoint |
adaptEndpoint(String beanName,
Endpoint<?> endpoint)
Adapt the given
Endpoint to a JmxEndpoint . |
protected void |
doStart() |
protected EndpointMBean |
getEndpointMBean(String beanName,
Endpoint<?> endpoint)
Deprecated.
as of 1.5 in favor of
adaptEndpoint(String, Endpoint) |
protected ObjectName |
getObjectName(Object bean,
String beanKey) |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
protected void |
locateAndRegisterEndpoints() |
protected void |
registerEndpoint(String beanName,
Endpoint<?> endpoint)
Deprecated.
as of 1.5 in favor of direct
JmxEndpoint registration or
adaptEndpoint(String, Endpoint) |
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setBeanFactory(BeanFactory beanFactory) |
void |
setDomain(String domain) |
void |
setEnsureUniqueRuntimeObjectNames(boolean ensureUniqueRuntimeObjectNames) |
void |
setObjectNameStaticProperties(Properties objectNameStaticProperties) |
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
adaptMBeanIfPossible, addExcludedBean, afterPropertiesSet, afterSingletonsInstantiated, createAndConfigureMBean, createModelMBean, destroy, isBeanDefinitionLazyInit, isMBean, onRegister, onUnregister, registerBeanNameOrInstance, registerBeans, registerManagedResource, registerManagedResource, setAllowEagerInit, setAssembler, setAutodetect, setAutodetectMode, setAutodetectModeName, setBeanClassLoader, setBeans, setExcludedBeans, setExposeManagedResourceClassLoader, setListeners, setNamingStrategy, setNotificationListenerMappings, setNotificationListeners, unregisterManagedResource
doRegister, doUnregister, getRegisteredObjectNames, getServer, onRegister, setRegistrationBehavior, setRegistrationBehaviorName, setRegistrationPolicy, setServer, unregisterBeans
public static final String DEFAULT_DOMAIN
public EndpointMBeanExporter()
EndpointMBeanExporter
instance.public EndpointMBeanExporter(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
EndpointMBeanExporter
instance.objectMapper
- the object mapperpublic void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
public void setBeanFactory(BeanFactory beanFactory)
setBeanFactory
in interface BeanFactoryAware
setBeanFactory
in class MBeanExporter
public void setDomain(String domain)
public void setEnsureUniqueRuntimeObjectNames(boolean ensureUniqueRuntimeObjectNames)
setEnsureUniqueRuntimeObjectNames
in class MBeanExporter
public void setObjectNameStaticProperties(Properties objectNameStaticProperties)
protected void doStart()
protected void locateAndRegisterEndpoints()
@Deprecated protected void registerEndpoint(String beanName, Endpoint<?> endpoint)
JmxEndpoint
registration or
adaptEndpoint(String, Endpoint)
Endpoint
with the MBeanServer
.beanName
- the bean nameendpoint
- the endpoint to registerprotected JmxEndpoint adaptEndpoint(String beanName, Endpoint<?> endpoint)
Endpoint
to a JmxEndpoint
.beanName
- the bean nameendpoint
- the endpoint to adapt@Deprecated protected EndpointMBean getEndpointMBean(String beanName, Endpoint<?> endpoint)
adaptEndpoint(String, Endpoint)
EndpointMBean
for the specified Endpoint
.beanName
- the bean nameendpoint
- the endpointEndpointMBean
protected ObjectName getObjectName(Object bean, String beanKey) throws MalformedObjectNameException
getObjectName
in class MBeanExporter
MalformedObjectNameException
public final boolean isAutoStartup()
isAutoStartup
in interface SmartLifecycle
public final void stop(Runnable callback)
stop
in interface SmartLifecycle
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.