Class AbstractDiscoveredEndpoint<O extends Operation>
- java.lang.Object
- org.springframework.boot.actuate.endpoint.AbstractExposableEndpoint<O>
- org.springframework.boot.actuate.endpoint.annotation.AbstractDiscoveredEndpoint<O>
- Type Parameters:
O
- the operation type
- All Implemented Interfaces:
DiscoveredEndpoint<O>
,ExposableEndpoint<O>
public abstract class AbstractDiscoveredEndpoint<O extends Operation> extends AbstractExposableEndpoint<O> implements DiscoveredEndpoint<O>
Abstract base class forendpoints
discovered by aEndpointDiscoverer
.- Since:
- 2.0.0
Constructor Summary
Constructors Constructor Description AbstractDiscoveredEndpoint(EndpointDiscoverer<?,?> discoverer, Object endpointBean, EndpointId id, boolean enabledByDefault, Collection<? extends O> operations)
Create a newAbstractDiscoveredEndpoint
instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendFields(org.springframework.core.style.ToStringCreator creator)
Object
getEndpointBean()
Return the source bean that was used to construct theDiscoveredEndpoint
.String
toString()
boolean
wasDiscoveredBy(Class<? extends EndpointDiscoverer<?,?>> discoverer)
Returntrue
if the endpoint was discovered by the specified discoverer.Methods inherited from class org.springframework.boot.actuate.endpoint.AbstractExposableEndpoint
getEndpointId, getOperations, isEnableByDefault
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.boot.actuate.endpoint.ExposableEndpoint
getEndpointId, getOperations, isEnableByDefault
Constructor Detail
AbstractDiscoveredEndpoint
public AbstractDiscoveredEndpoint(EndpointDiscoverer<?,?> discoverer, Object endpointBean, EndpointId id, boolean enabledByDefault, Collection<? extends O> operations)
Create a newAbstractDiscoveredEndpoint
instance.- Parameters:
discoverer
- the discoverer that discovered the endpointendpointBean
- the primary source beanid
- the ID of the endpointenabledByDefault
- if the endpoint is enabled by defaultoperations
- the endpoint operations
Method Detail
getEndpointBean
public Object getEndpointBean()
Description copied from interface:DiscoveredEndpoint
Return the source bean that was used to construct theDiscoveredEndpoint
.- Specified by:
getEndpointBean
in interfaceDiscoveredEndpoint<O extends Operation>
- Returns:
- the source endpoint bean
wasDiscoveredBy
public boolean wasDiscoveredBy(Class<? extends EndpointDiscoverer<?,?>> discoverer)
Description copied from interface:DiscoveredEndpoint
Returntrue
if the endpoint was discovered by the specified discoverer.- Specified by:
wasDiscoveredBy
in interfaceDiscoveredEndpoint<O extends Operation>
- Parameters:
discoverer
- the discoverer type- Returns:
true
if discovered using the specified discoverer
appendFields
protected void appendFields(org.springframework.core.style.ToStringCreator creator)