Class ControllerEndpointDiscoverer
java.lang.Object
org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer<ExposableControllerEndpoint,Operation>
org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpointDiscoverer
- All Implemented Interfaces:
EndpointsSupplier<ExposableControllerEndpoint>,ControllerEndpointsSupplier
@ImportRuntimeHints(org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpointDiscoverer.ControllerEndpointDiscovererRuntimeHints.class)
public class ControllerEndpointDiscoverer
extends EndpointDiscoverer<ExposableControllerEndpoint,Operation>
implements ControllerEndpointsSupplier
- Since:
- 2.0.0
- Author:
- Phillip Webb
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer
EndpointDiscoverer.OperationKey -
Constructor Summary
ConstructorsConstructorDescriptionControllerEndpointDiscoverer(ApplicationContext applicationContext, List<PathMapper> endpointPathMappers, Collection<EndpointFilter<ExposableControllerEndpoint>> filters) Create a newControllerEndpointDiscovererinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected ExposableControllerEndpointcreateEndpoint(Object endpointBean, EndpointId id, boolean enabledByDefault, Collection<Operation> operations) Factory method called to create theendpoint.protected OperationcreateOperation(EndpointId endpointId, DiscoveredOperationMethod operationMethod, OperationInvoker invoker) Factory method to create anendpoint operation.protected EndpointDiscoverer.OperationKeycreateOperationKey(Operation operation) Create anEndpointDiscoverer.OperationKeyfor the given operation.protected booleanisEndpointTypeExposed(Class<?> beanType) Determine if an endpoint bean should be exposed.Methods inherited from class org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer
getEndpoints, getEndpointType, isExtensionTypeExposedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.boot.actuate.endpoint.EndpointsSupplier
getEndpoints
-
Constructor Details
-
ControllerEndpointDiscoverer
public ControllerEndpointDiscoverer(ApplicationContext applicationContext, List<PathMapper> endpointPathMappers, Collection<EndpointFilter<ExposableControllerEndpoint>> filters) Create a newControllerEndpointDiscovererinstance.- Parameters:
applicationContext- the source application contextendpointPathMappers- the endpoint path mappersfilters- filters to apply
-
-
Method Details
-
isEndpointTypeExposed
Description copied from class:EndpointDiscovererDetermine if an endpoint bean should be exposed. Subclasses can override this method to provide additional logic.- Overrides:
isEndpointTypeExposedin classEndpointDiscoverer<ExposableControllerEndpoint,Operation> - Parameters:
beanType- the endpoint bean type- Returns:
trueif the endpoint is exposed
-
createEndpoint
protected ExposableControllerEndpoint createEndpoint(Object endpointBean, EndpointId id, boolean enabledByDefault, Collection<Operation> operations) Description copied from class:EndpointDiscovererFactory method called to create theendpoint.- Specified by:
createEndpointin classEndpointDiscoverer<ExposableControllerEndpoint,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
DiscoveredEndpointis recommended)
-
createOperation
protected Operation createOperation(EndpointId endpointId, DiscoveredOperationMethod operationMethod, OperationInvoker invoker) Description copied from class:EndpointDiscovererFactory method to create anendpoint operation.- Specified by:
createOperationin classEndpointDiscoverer<ExposableControllerEndpoint,Operation> - Parameters:
endpointId- the endpoint idoperationMethod- the operation methodinvoker- the invoker to use- Returns:
- a created operation
-
createOperationKey
Description copied from class:EndpointDiscovererCreate anEndpointDiscoverer.OperationKeyfor the given operation.- Specified by:
createOperationKeyin classEndpointDiscoverer<ExposableControllerEndpoint,Operation> - Parameters:
operation- the source operation- Returns:
- the operation key
-