Class EndpointMBean
- java.lang.Object
- org.springframework.boot.actuate.endpoint.jmx.EndpointMBean
- All Implemented Interfaces:
JmxEndpoint
- Direct Known Subclasses:
DataEndpointMBean
,LoggersEndpointMBean
,ShutdownEndpointMBean
public abstract class EndpointMBean extends Object implements JmxEndpoint
Base for adapters that convertEndpoint
implementations toJmxEndpoint
.- See Also:
JmxEndpoint
,DataEndpointMBean
Constructor Summary
Constructors Constructor Description EndpointMBean(String beanName, Endpoint<?> endpoint, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Create a newEndpointMBean
instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
convert(Object data)
Convert the given data into JSON.Endpoint<?>
getEndpoint()
String
getEndpointClass()
Class<? extends Endpoint>
getEndpointType()
Return the type ofEndpoint
exposed, ornull
if thisJmxEndpoint
exposes information that cannot be represented as a traditionalEndpoint
.String
getIdentity()
Return the MBean identity for this endpoint.boolean
isEnabled()
Return if the JMX endpoint is enabled.boolean
isSensitive()
Constructor Detail
EndpointMBean
public EndpointMBean(String beanName, Endpoint<?> endpoint, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Create a newEndpointMBean
instance.- Parameters:
beanName
- the bean nameendpoint
- the endpoint to wrapobjectMapper
- theObjectMapper
used to convert the payload
Method Detail
getEndpointClass
@ManagedAttribute(description="Returns the class of the underlying endpoint") public String getEndpointClass()
isEnabled
public boolean isEnabled()
Description copied from interface:JmxEndpoint
Return if the JMX endpoint is enabled.- Specified by:
isEnabled
in interfaceJmxEndpoint
- Returns:
- if the endpoint is enabled
isSensitive
@ManagedAttribute(description="Indicates whether the underlying endpoint exposes sensitive information") public boolean isSensitive()
getIdentity
public String getIdentity()
Description copied from interface:JmxEndpoint
Return the MBean identity for this endpoint.- Specified by:
getIdentity
in interfaceJmxEndpoint
- Returns:
- the MBean identity.
getEndpointType
public Class<? extends Endpoint> getEndpointType()
Description copied from interface:JmxEndpoint
Return the type ofEndpoint
exposed, ornull
if thisJmxEndpoint
exposes information that cannot be represented as a traditionalEndpoint
.- Specified by:
getEndpointType
in interfaceJmxEndpoint
- Returns:
- the endpoint type
getEndpoint
public Endpoint<?> getEndpoint()