Class AbstractJmxEndpoint
- java.lang.Object
- org.springframework.boot.actuate.endpoint.jmx.AbstractJmxEndpoint
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,JmxEndpoint
,org.springframework.context.EnvironmentAware
- Direct Known Subclasses:
AuditEventsJmxEndpoint
public abstract class AbstractJmxEndpoint extends Object implements JmxEndpoint, org.springframework.context.EnvironmentAware
Abstract base class forJmxEndpoint
implementations without a backingEndpoint
.- Since:
- 1.5.0
Constructor Summary
Constructors Constructor Description AbstractJmxEndpoint(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
convert(Object data)
Convert the given data into JSON.Class<? extends Endpoint>
getEndpointType()
Return the type ofEndpoint
exposed, ornull
if thisJmxEndpoint
exposes information that cannot be represented as a traditionalEndpoint
.protected org.springframework.core.env.Environment
getEnvironment()
String
getIdentity()
Return the MBean identity for this endpoint.boolean
isEnabled()
Return if the JMX endpoint is enabled.void
setEnabled(Boolean enabled)
void
setEnvironment(org.springframework.core.env.Environment environment)
Constructor Detail
AbstractJmxEndpoint
public AbstractJmxEndpoint(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Method Detail
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment)
- Specified by:
setEnvironment
in interfaceorg.springframework.context.EnvironmentAware
getEnvironment
protected final org.springframework.core.env.Environment getEnvironment()
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
setEnabled
public void setEnabled(Boolean enabled)
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