类 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 class
A key generated for anOperation
based 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 newEndpointDiscoverer
instance. -
方法概要
修饰符和类型方法说明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)
protected abstract E
createEndpoint
(Object endpointBean, EndpointId id, Access defaultAccess, Collection<O> operations) Factory method called to create theendpoint
.protected abstract O
createOperation
(EndpointId endpointId, DiscoveredOperationMethod operationMethod, OperationInvoker invoker) Factory method to create anendpoint operation
.protected abstract EndpointDiscoverer.OperationKey
createOperationKey
(O operation) Create anEndpointDiscoverer.OperationKey
for the given operation.final Collection
<E> Return the provided endpoints.protected boolean
isEndpointTypeExposed
(Class<?> beanType) Determine if an endpoint bean should be exposed.protected boolean
isExtensionTypeExposed
(Class<?> extensionBeanType) Determine if an extension bean should be exposed.protected boolean
isInvocable
(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 newEndpointDiscoverer
instance.- 参数:
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 newEndpointDiscoverer
instance.- 参数:
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
从接口复制的说明:EndpointsSupplier
Return 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 returnstrue
if the endpoint has any operations, otherwisefalse
.- 参数:
endpoint
- the endpoint to assess- 返回:
true
if 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- 返回:
true
if 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- 返回:
true
if 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
DiscoveredEndpoint
is 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
DiscoveredEndpoint
is 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.OperationKey
for the given operation.- 参数:
operation
- the source operation- 返回:
- the operation key
-
EndpointDiscoverer(ApplicationContext, ParameterValueMapper, Collection, Collection, Collection)