类 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 forEndpointsSupplier
implementations that discover@Endpoint
beans and@EndpointExtension
beans in an application context.- 从以下版本开始:
- 2.0.0
嵌套类概要
嵌套类 修饰符和类型 类 说明 protected static class
EndpointDiscoverer.OperationKey
A key generated for anOperation
based on specific criteria from the actual operation implementation.
构造器概要
构造器 构造器 说明 EndpointDiscoverer(org.springframework.context.ApplicationContext applicationContext, ParameterValueMapper parameterValueMapper, Collection<OperationInvokerAdvisor> invokerAdvisors, Collection<EndpointFilter<E>> filters)
Create a newEndpointDiscoverer
instance.
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected abstract E
createEndpoint(Object endpointBean, EndpointId id, boolean enabledByDefault, 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.Collection<E>
getEndpoints()
Return the provided endpoints.protected Class<? extends E>
getEndpointType()
protected boolean
isEndpointExposed(Object endpointBean)
Determine if an endpoint bean should be exposed.protected boolean
isExtensionExposed(Object extensionBean)
Determine if an extension bean should be exposed.
构造器详细资料
EndpointDiscoverer
public EndpointDiscoverer(org.springframework.context.ApplicationContext applicationContext, ParameterValueMapper parameterValueMapper, Collection<OperationInvokerAdvisor> invokerAdvisors, Collection<EndpointFilter<E>> filters)
Create a newEndpointDiscoverer
instance.- 参数:
applicationContext
- the source application contextparameterValueMapper
- the parameter value mapperinvokerAdvisors
- invoker advisors to applyfilters
- filters to apply
方法详细资料
getEndpoints
public final Collection<E> getEndpoints()
从接口复制的说明:EndpointsSupplier
Return the provided endpoints.- 指定者:
getEndpoints
在接口中EndpointsSupplier<E extends ExposableEndpoint<O>>
- 返回:
- the endpoints
isExtensionExposed
protected boolean isExtensionExposed(Object extensionBean)
Determine if an extension bean should be exposed. Subclasses can override this method to provide additional logic.- 参数:
extensionBean
- the extension bean- 返回:
true
if the extension is exposed
isEndpointExposed
protected boolean isEndpointExposed(Object endpointBean)
Determine if an endpoint bean should be exposed. Subclasses can override this method to provide additional logic.- 参数:
endpointBean
- the endpoint bean- 返回:
true
if the endpoint is exposed
getEndpointType
protected Class<? extends E> getEndpointType()
createEndpoint
protected abstract E createEndpoint(Object endpointBean, EndpointId id, boolean enabledByDefault, Collection<O> operations)
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)
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
protected abstract EndpointDiscoverer.OperationKey createOperationKey(O operation)
Create anEndpointDiscoverer.OperationKey
for the given operation.- 参数:
operation
- the source operation- 返回:
- the operation key