E
- the endpoint typeO
- the operation typepublic abstract class EndpointDiscoverer<E extends ExposableEndpoint<O>,O extends Operation> extends 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(ApplicationContext applicationContext,
ParameterValueMapper parameterValueMapper,
Collection<OperationInvokerAdvisor> invokerAdvisors,
Collection<EndpointFilter<E>> filters)
Create a new
EndpointDiscoverer instance. |
Modifier and Type | Method and Description |
---|---|
protected E |
createEndpoint(Object endpointBean,
EndpointId id,
boolean enabledByDefault,
Collection<O> operations)
Factory method called to create the
endpoint . |
protected abstract E |
createEndpoint(Object endpointBean,
String id,
boolean enabledByDefault,
Collection<O> operations)
Deprecated.
Since 2.0.6 in favor of
createEndpoint(Object, EndpointId, boolean, Collection) |
protected O |
createOperation(EndpointId endpointId,
DiscoveredOperationMethod operationMethod,
OperationInvoker invoker)
Factory method to create an
endpoint operation . |
protected abstract O |
createOperation(String endpointId,
DiscoveredOperationMethod operationMethod,
OperationInvoker invoker)
Deprecated.
since 2.0.6 in favor of
createOperation(EndpointId, DiscoveredOperationMethod, OperationInvoker) |
protected abstract EndpointDiscoverer.OperationKey |
createOperationKey(O operation)
Create an
EndpointDiscoverer.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.
|
public EndpointDiscoverer(ApplicationContext applicationContext, ParameterValueMapper parameterValueMapper, Collection<OperationInvokerAdvisor> invokerAdvisors, Collection<EndpointFilter<E>> filters)
EndpointDiscoverer
instance.applicationContext
- the source application contextparameterValueMapper
- the parameter value mapperinvokerAdvisors
- invoker advisors to applyfilters
- filters to applypublic final Collection<E> getEndpoints()
EndpointsSupplier
getEndpoints
in interface EndpointsSupplier<E extends ExposableEndpoint<O>>
protected boolean isExtensionExposed(Object extensionBean)
extensionBean
- the extension beantrue
if the extension is exposedprotected boolean isEndpointExposed(Object endpointBean)
endpointBean
- the endpoint beantrue
if the endpoint is exposedprotected E createEndpoint(Object endpointBean, EndpointId id, boolean enabledByDefault, 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)@Deprecated protected abstract E createEndpoint(Object endpointBean, String id, boolean enabledByDefault, Collection<O> operations)
createEndpoint(Object, EndpointId, boolean, Collection)
endpoint
.endpointBean
- the source endpoint beanid
- the ID of the endpointenabledByDefault
- if the endpoint is enabled by defaultoperations
- the endpoint operationsDiscoveredEndpoint
is recommended)protected O createOperation(EndpointId endpointId, DiscoveredOperationMethod operationMethod, OperationInvoker invoker)
endpoint operation
.endpointId
- the endpoint idoperationMethod
- the operation methodinvoker
- the invoker to use@Deprecated protected abstract O createOperation(String endpointId, DiscoveredOperationMethod operationMethod, OperationInvoker invoker)
createOperation(EndpointId, DiscoveredOperationMethod, OperationInvoker)
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 operationCopyright © 2018 Pivotal Software, Inc.. All rights reserved.