E - the endpoint typeO - the operation typepublic abstract class EndpointDiscoverer<E extends ExposableEndpoint<O>,O extends Operation> extends java.lang.Object implements EndpointsSupplier<E>
EndpointsSupplier implementations that discover
@Endpoint beans and @EndpointExtension beans
in an application context.| Modifier and Type | Class and Description |
|---|---|
protected static class |
EndpointDiscoverer.OperationKey
A key generated for an
Operation based on specific criteria from the actual
operation implementation. |
| Constructor and Description |
|---|
EndpointDiscoverer(org.springframework.context.ApplicationContext applicationContext,
ParameterValueMapper parameterValueMapper,
java.util.Collection<OperationInvokerAdvisor> invokerAdvisors,
java.util.Collection<EndpointFilter<E>> filters)
Create a new
EndpointDiscoverer instance. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract E |
createEndpoint(java.lang.Object endpointBean,
EndpointId id,
boolean enabledByDefault,
java.util.Collection<O> operations)
Factory method called to create the
endpoint. |
protected abstract O |
createOperation(EndpointId endpointId,
DiscoveredOperationMethod operationMethod,
OperationInvoker invoker)
Factory method to create an
endpoint operation. |
protected abstract EndpointDiscoverer.OperationKey |
createOperationKey(O operation)
Create an
EndpointDiscoverer.OperationKey for the given operation. |
java.util.Collection<E> |
getEndpoints()
Return the provided endpoints.
|
protected java.lang.Class<? extends E> |
getEndpointType() |
protected boolean |
isEndpointExposed(java.lang.Object endpointBean)
Deprecated.
|
protected boolean |
isEndpointTypeExposed(java.lang.Class<?> beanType)
Determine if an endpoint bean should be exposed.
|
protected boolean |
isExtensionExposed(java.lang.Object extensionBean)
Deprecated.
|
protected boolean |
isExtensionTypeExposed(java.lang.Class<?> extensionBeanType)
Determine if an extension bean should be exposed.
|
public EndpointDiscoverer(org.springframework.context.ApplicationContext applicationContext,
ParameterValueMapper parameterValueMapper,
java.util.Collection<OperationInvokerAdvisor> invokerAdvisors,
java.util.Collection<EndpointFilter<E>> filters)
EndpointDiscoverer instance.applicationContext - the source application contextparameterValueMapper - the parameter value mapperinvokerAdvisors - invoker advisors to applyfilters - filters to applypublic final java.util.Collection<E> getEndpoints()
EndpointsSuppliergetEndpoints in interface EndpointsSupplier<E extends ExposableEndpoint<O>>@Deprecated protected boolean isExtensionExposed(java.lang.Object extensionBean)
extensionBean - the extension beantrue if the extension is exposedprotected boolean isExtensionTypeExposed(java.lang.Class<?> extensionBeanType)
extensionBeanType - the extension bean typetrue if the extension is exposed@Deprecated protected boolean isEndpointExposed(java.lang.Object endpointBean)
endpointBean - the endpoint beantrue if the endpoint is exposedprotected boolean isEndpointTypeExposed(java.lang.Class<?> beanType)
beanType - the endpoint bean typetrue if the endpoint is exposedprotected java.lang.Class<? extends E> getEndpointType()
protected abstract E createEndpoint(java.lang.Object endpointBean, EndpointId id, boolean enabledByDefault, java.util.Collection<O> operations)
endpoint.endpointBean - the source endpoint beanid - the ID of the endpointenabledByDefault - if the endpoint is enabled by defaultoperations - the endpoint operationsDiscoveredEndpoint is recommended)protected abstract O createOperation(EndpointId endpointId, DiscoveredOperationMethod operationMethod, OperationInvoker invoker)
endpoint operation.endpointId - the endpoint idoperationMethod - the operation methodinvoker - the invoker to useprotected abstract EndpointDiscoverer.OperationKey createOperationKey(O operation)
EndpointDiscoverer.OperationKey for the given operation.operation - the source operation