类 EndpointDiscoverer<E extends ExposableEndpoint<O>,O extends Operation>
java.lang.Object
org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer<E,O>
- 类型参数:
E- the endpoint typeO- the operation type
- 所有已实现的接口:
EndpointsSupplier<E>
- 直接已知子类:
ControllerEndpointDiscoverer,JmxEndpointDiscoverer,ServletEndpointDiscoverer,WebEndpointDiscoverer
public abstract class EndpointDiscoverer<E extends ExposableEndpoint<O>,O extends Operation>
extends Object
implements EndpointsSupplier<E>
A Base for
EndpointsSupplier implementations that discover
@Endpoint beans and @EndpointExtension beans
in an application context.- 从以下版本开始:
- 2.0.0
- 作者:
- Andy Wilkinson, Stephane Nicoll, Phillip Webb
-
嵌套类概要
嵌套类修饰符和类型类说明protected static final classA key generated for anOperationbased on specific criteria from the actual operation implementation. -
构造器概要
构造器构造器说明EndpointDiscoverer(ApplicationContext applicationContext, ParameterValueMapper parameterValueMapper, Collection<OperationInvokerAdvisor> invokerAdvisors, Collection<EndpointFilter<E>> endpointFilters) 已过时, 待删除: 此 API 元素将从以后的版本中删除。EndpointDiscoverer(ApplicationContext applicationContext, ParameterValueMapper parameterValueMapper, Collection<OperationInvokerAdvisor> invokerAdvisors, Collection<EndpointFilter<E>> endpointFilters, Collection<OperationFilter<O>> operationFilters) Create a newEndpointDiscovererinstance. -
方法概要
修饰符和类型方法说明protected EcreateEndpoint(Object endpointBean, EndpointId id, boolean enabledByDefault, Collection<O> operations) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 3.4.0 for removal in 4.0.0 in favor ofcreateEndpoint(Object, EndpointId, Access, Collection)protected abstract EcreateEndpoint(Object endpointBean, EndpointId id, Access defaultAccess, Collection<O> operations) Factory method called to create theendpoint.protected abstract OcreateOperation(EndpointId endpointId, DiscoveredOperationMethod operationMethod, OperationInvoker invoker) Factory method to create anendpoint operation.protected abstract EndpointDiscoverer.OperationKeycreateOperationKey(O operation) Create anEndpointDiscoverer.OperationKeyfor the given operation.final Collection<E> Return the provided endpoints.protected booleanisEndpointTypeExposed(Class<?> beanType) Determine if an endpoint bean should be exposed.protected booleanisExtensionTypeExposed(Class<?> extensionBeanType) Determine if an extension bean should be exposed.protected booleanisInvocable(E endpoint) Returns whether the endpoint is invocable and should be included in the discovered endpoints.
-
构造器详细资料
-
EndpointDiscoverer
@Deprecated(since="3.4.0", forRemoval=true) public EndpointDiscoverer(ApplicationContext applicationContext, ParameterValueMapper parameterValueMapper, Collection<OperationInvokerAdvisor> invokerAdvisors, Collection<EndpointFilter<E>> endpointFilters) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 3.4.0 for removal in 4.0.0 in favor ofEndpointDiscoverer(ApplicationContext, ParameterValueMapper, Collection, Collection, Collection)Create a newEndpointDiscovererinstance.- 参数:
applicationContext- the source application contextparameterValueMapper- the parameter value mapperinvokerAdvisors- invoker advisors to applyendpointFilters- endpoint filters to apply
-
EndpointDiscoverer
public EndpointDiscoverer(ApplicationContext applicationContext, ParameterValueMapper parameterValueMapper, Collection<OperationInvokerAdvisor> invokerAdvisors, Collection<EndpointFilter<E>> endpointFilters, Collection<OperationFilter<O>> operationFilters) Create a newEndpointDiscovererinstance.- 参数:
applicationContext- the source application contextparameterValueMapper- the parameter value mapperinvokerAdvisors- invoker advisors to applyendpointFilters- endpoint filters to applyoperationFilters- operation filters to apply- 从以下版本开始:
- 3.4.0
-
-
方法详细资料
-
getEndpoints
从接口复制的说明:EndpointsSupplierReturn the provided endpoints.- 指定者:
getEndpoints在接口中EndpointsSupplier<E extends ExposableEndpoint<O>>- 返回:
- the endpoints
-
isInvocable
Returns whether the endpoint is invocable and should be included in the discovered endpoints. The default implementation returnstrueif the endpoint has any operations, otherwisefalse.- 参数:
endpoint- the endpoint to assess- 返回:
trueif the endpoint is invocable, otherwisefalse.- 从以下版本开始:
- 3.4.0
-
isExtensionTypeExposed
Determine if an extension bean should be exposed. Subclasses can override this method to provide additional logic.- 参数:
extensionBeanType- the extension bean type- 返回:
trueif the extension is exposed
-
isEndpointTypeExposed
Determine if an endpoint bean should be exposed. Subclasses can override this method to provide additional logic.- 参数:
beanType- the endpoint bean type- 返回:
trueif the endpoint is exposed
-
getEndpointType
-
createEndpoint
@Deprecated(since="3.4.0", forRemoval=true) protected E createEndpoint(Object endpointBean, EndpointId id, boolean enabledByDefault, Collection<O> operations) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 3.4.0 for removal in 4.0.0 in favor ofcreateEndpoint(Object, EndpointId, Access, Collection)Factory method called to create theendpoint.- 参数:
endpointBean- the source endpoint beanid- the ID of the endpointenabledByDefault- if the endpoint is enabled by defaultoperations- the endpoint operations- 返回:
- a created endpoint (a
DiscoveredEndpointis recommended)
-
createEndpoint
protected abstract E createEndpoint(Object endpointBean, EndpointId id, Access defaultAccess, Collection<O> operations) Factory method called to create theendpoint.- 参数:
endpointBean- the source endpoint beanid- the ID of the endpointdefaultAccess- access to the endpoint that is permitted by defaultoperations- the endpoint operations- 返回:
- a created endpoint (a
DiscoveredEndpointis recommended)
-
createOperation
protected abstract O createOperation(EndpointId endpointId, DiscoveredOperationMethod operationMethod, OperationInvoker invoker) Factory method to create anendpoint operation.- 参数:
endpointId- the endpoint idoperationMethod- the operation methodinvoker- the invoker to use- 返回:
- a created operation
-
createOperationKey
Create anEndpointDiscoverer.OperationKeyfor the given operation.- 参数:
operation- the source operation- 返回:
- the operation key
-
EndpointDiscoverer(ApplicationContext, ParameterValueMapper, Collection, Collection, Collection)