public abstract class AbstractAnnotationMethodEndpointMapping<T> extends AbstractMethodEndpointMapping<T>
EndpointMapping
implementations that map classes tagged with
an annotation. By default the annotation is Endpoint
, but this can be overriden in subclasses.
The methods of each bean carrying @Endpoint will be registered using AbstractMethodEndpointMapping.registerMethods(String)
.
Constructor and Description |
---|
AbstractAnnotationMethodEndpointMapping() |
Modifier and Type | Method and Description |
---|---|
protected Class<? extends Annotation> |
getEndpointAnnotationType()
Returns the 'endpoint' annotation type.
|
protected void |
initApplicationContext()
Initializes the interceptors.
|
void |
setDetectEndpointsInAncestorContexts(boolean detectEndpointsInAncestorContexts)
Set whether to detect endpoint beans in ancestor ApplicationContexts.
|
getEndpointClass, getEndpointInternal, getLookupKeyForMessage, getLookupKeyForMethod, getLookupKeysForMethod, lookupEndpoint, registerEndpoint, registerMethods, registerMethods
createEndpointInvocationChain, getDefaultEndpoint, getEndpoint, getInterceptors, getOrder, initInterceptors, resolveStringEndpoint, setDefaultEndpoint, setInterceptors, setOrder
public AbstractAnnotationMethodEndpointMapping()
public void setDetectEndpointsInAncestorContexts(boolean detectEndpointsInAncestorContexts)
Default is "false": Only endpoint beans in the current ApplicationContext will be detected, i.e. only in the context that this EndpointMapping itself is defined in (typically the current MessageDispatcherServlet's context).
Switch this flag on to detect endpoint beans in ancestor contexts (typically the Spring root WebApplicationContext) as well.
protected Class<? extends Annotation> getEndpointAnnotationType()
Endpoint
.protected void initApplicationContext() throws org.springframework.beans.BeansException
AbstractEndpointMapping
initApplicationContext
in class AbstractEndpointMapping
org.springframework.beans.BeansException
AbstractEndpointMapping.initInterceptors()