Class ServletEndpointDiscoverer
- java.lang.Object
- org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer<ExposableServletEndpoint,Operation>
- org.springframework.boot.actuate.endpoint.web.annotation.ServletEndpointDiscoverer
- All Implemented Interfaces:
EndpointsSupplier<ExposableServletEndpoint>
,ServletEndpointsSupplier
public class ServletEndpointDiscoverer extends EndpointDiscoverer<ExposableServletEndpoint,Operation> implements ServletEndpointsSupplier
- Since:
- 2.0.0
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer
EndpointDiscoverer.OperationKey
Constructor Summary
Constructors Constructor Description ServletEndpointDiscoverer(org.springframework.context.ApplicationContext applicationContext, List<PathMapper> endpointPathMappers, Collection<EndpointFilter<ExposableServletEndpoint>> filters)
Create a newServletEndpointDiscoverer
instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ExposableServletEndpoint
createEndpoint(Object endpointBean, EndpointId id, boolean enabledByDefault, Collection<Operation> operations)
Factory method called to create theendpoint
.protected Operation
createOperation(EndpointId endpointId, DiscoveredOperationMethod operationMethod, OperationInvoker invoker)
Factory method to create anendpoint operation
.protected EndpointDiscoverer.OperationKey
createOperationKey(Operation operation)
Create anEndpointDiscoverer.OperationKey
for the given operation.protected boolean
isEndpointExposed(Object endpointBean)
Determine if an endpoint bean should be exposed.Methods inherited from class org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer
getEndpoints, getEndpointType, isExtensionExposed
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.boot.actuate.endpoint.EndpointsSupplier
getEndpoints
Constructor Detail
ServletEndpointDiscoverer
public ServletEndpointDiscoverer(org.springframework.context.ApplicationContext applicationContext, List<PathMapper> endpointPathMappers, Collection<EndpointFilter<ExposableServletEndpoint>> filters)
Create a newServletEndpointDiscoverer
instance.- Parameters:
applicationContext
- the source application contextendpointPathMappers
- the endpoint path mappersfilters
- filters to apply
Method Detail
isEndpointExposed
protected boolean isEndpointExposed(Object endpointBean)
Description copied from class:EndpointDiscoverer
Determine if an endpoint bean should be exposed. Subclasses can override this method to provide additional logic.- Overrides:
isEndpointExposed
in classEndpointDiscoverer<ExposableServletEndpoint,Operation>
- Parameters:
endpointBean
- the endpoint bean- Returns:
true
if the endpoint is exposed
createEndpoint
protected ExposableServletEndpoint createEndpoint(Object endpointBean, EndpointId id, boolean enabledByDefault, Collection<Operation> operations)
Description copied from class:EndpointDiscoverer
Factory method called to create theendpoint
.- Specified by:
createEndpoint
in classEndpointDiscoverer<ExposableServletEndpoint,Operation>
- Parameters:
endpointBean
- the source endpoint beanid
- the ID of the endpointenabledByDefault
- if the endpoint is enabled by defaultoperations
- the endpoint operations- Returns:
- a created endpoint (a
DiscoveredEndpoint
is recommended)
createOperation
protected Operation createOperation(EndpointId endpointId, DiscoveredOperationMethod operationMethod, OperationInvoker invoker)
Description copied from class:EndpointDiscoverer
Factory method to create anendpoint operation
.- Specified by:
createOperation
in classEndpointDiscoverer<ExposableServletEndpoint,Operation>
- Parameters:
endpointId
- the endpoint idoperationMethod
- the operation methodinvoker
- the invoker to use- Returns:
- a created operation
createOperationKey
protected EndpointDiscoverer.OperationKey createOperationKey(Operation operation)
Description copied from class:EndpointDiscoverer
Create anEndpointDiscoverer.OperationKey
for the given operation.- Specified by:
createOperationKey
in classEndpointDiscoverer<ExposableServletEndpoint,Operation>
- Parameters:
operation
- the source operation- Returns:
- the operation key