K - the type of the operation keyT - the type of the operationpublic abstract class AnnotationEndpointDiscoverer<K,T extends Operation> extends Object implements EndpointDiscoverer<T>
EndpointDiscoverer implementation that discovers
@Endpoint beans and @EndpointExtension beans
in an application context.| Modifier and Type | Class and Description |
|---|---|
protected class |
AnnotationEndpointDiscoverer.DiscoveredEndpoint
A discovered endpoint (which may not be valid and might not ultimately be exposed).
|
protected class |
AnnotationEndpointDiscoverer.DiscoveredExtension
A discovered extension.
|
protected class |
AnnotationEndpointDiscoverer.OperationKey
Define the key of an operation in the context of an operation's implementation.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AnnotationEndpointDiscoverer(org.springframework.context.ApplicationContext applicationContext,
OperationFactory<T> operationFactory,
Function<T,K> operationKeyFactory,
ParameterMapper parameterMapper,
Collection<? extends OperationMethodInvokerAdvisor> invokerAdvisors,
Collection<? extends EndpointFilter<T>> filters)
Create a new
AnnotationEndpointDiscoverer instance. |
| Modifier and Type | Method and Description |
|---|---|
Collection<EndpointInfo<T>> |
discoverEndpoints()
Perform endpoint discovery.
|
protected Class<T> |
getOperationType()
Return the operation type being discovered.
|
protected boolean |
isExtensionExposed(Class<?> endpointType,
Class<?> extensionType,
EndpointInfo<T> endpointInfo)
Determines if an extension is exposed.
|
protected void |
verify(Collection<AnnotationEndpointDiscoverer.DiscoveredEndpoint> exposedEndpoints)
Allows subclasses to verify that the descriptors are correctly configured.
|
protected AnnotationEndpointDiscoverer(org.springframework.context.ApplicationContext applicationContext,
OperationFactory<T> operationFactory,
Function<T,K> operationKeyFactory,
ParameterMapper parameterMapper,
Collection<? extends OperationMethodInvokerAdvisor> invokerAdvisors,
Collection<? extends EndpointFilter<T>> filters)
AnnotationEndpointDiscoverer instance.applicationContext - the application contextoperationFactory - a factory used to create operationsoperationKeyFactory - a factory used to create a key for an operationparameterMapper - the ParameterMapper used to convert arguments when
an operation is invokedinvokerAdvisors - advisors used to add additional invoker advisefilters - filters that must match for an endpoint to be exposedpublic final Collection<EndpointInfo<T>> discoverEndpoints()
EndpointDiscovererdiscoverEndpoints in interface EndpointDiscoverer<T extends Operation>protected Class<T> getOperationType()
<T>".protected boolean isExtensionExposed(Class<?> endpointType, Class<?> extensionType, EndpointInfo<T> endpointInfo)
endpointType - the endpoint typeextensionType - the extension typeendpointInfo - the endpoint infoprotected void verify(Collection<AnnotationEndpointDiscoverer.DiscoveredEndpoint> exposedEndpoints)
exposedEndpoints - the discovered endpoints to verify before exposingCopyright © 2017 Pivotal Software, Inc.. All rights reserved.