Top Description Inners Fields Constructors Methods
org.springframework.web.socket.config

pack-priv Class HandlersBeanDefinitionParser

extends Object
implements BeanDefinitionParser
Class Inheritance
All Implemented Interfaces
org.springframework.beans.factory.xml.BeanDefinitionParser
Imports
java.util.Arrays, .List, org.w3c.dom.Element, org.springframework.beans.factory.config.BeanDefinition, .ConstructorArgumentValues, .RuntimeBeanReference, org.springframework.beans.factory.parsing.BeanComponentDefinition, .CompositeComponentDefinition, org.springframework.beans.factory.support.ManagedList, .ManagedMap, .RootBeanDefinition, org.springframework.beans.factory.xml.BeanDefinitionParser, .ParserContext, org.springframework.lang.Nullable, org.springframework.util.ObjectUtils, .StringUtils, org.springframework.util.xml.DomUtils, org.springframework.web.socket.server.support.OriginHandshakeInterceptor, .WebSocketHandlerMapping, .WebSocketHttpRequestHandler, org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler

Parses the configuration for the <websocket:handlers/> namespace element. Registers a Spring MVC SimpleUrlHandlerMapping to map HTTP WebSocket handshake (or SockJS) requests to WebSocketHandlers.
Authors
Brian Clozel, Rossen Stoyanchev
Since
4.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static interface
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final int
private static final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public BeanDefinition
parse(Element
the element that is to be parsed into one or more BeanDefinitions
element
,
ParserContext
the object encapsulating the current state of the parsing process; provides access to a org.springframework.beans.factory.support.BeanDefinitionRegistry
context
)

Implements org.springframework.beans.factory.xml.BeanDefinitionParser.parse.

Parse the specified Element and register the resulting BeanDefinition(s) with the BeanDefinitionRegistry embedded in the supplied ParserContext.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_MAPPING_ORDERback to summary
private static final int DEFAULT_MAPPING_ORDER
SOCK_JS_SCHEDULER_NAMEback to summary
private static final String SOCK_JS_SCHEDULER_NAME

Constructor Detail

HandlersBeanDefinitionParserback to summary
pack-priv HandlersBeanDefinitionParser()

Method Detail

parseback to summary
public BeanDefinition parse(Element element, ParserContext context)

Implements org.springframework.beans.factory.xml.BeanDefinitionParser.parse.

Doc from org.springframework.beans.factory.xml.BeanDefinitionParser.parse.

Parse the specified Element and register the resulting BeanDefinition(s) with the BeanDefinitionRegistry embedded in the supplied ParserContext.

Implementations must return the primary BeanDefinition that results from the parse if they will ever be used in a nested fashion (for example as an inner tag in a <property/> tag). Implementations may return null if they will not be used in a nested fashion.

Parameters
element:Element

the element that is to be parsed into one or more BeanDefinitions

context:ParserContext

the object encapsulating the current state of the parsing process; provides access to a org.springframework.beans.factory.support.BeanDefinitionRegistry

Returns:BeanDefinition

the primary BeanDefinition

Annotations
@Override
@Nullable
org.springframework.web.socket.config back to summary

private Interface HandlersBeanDefinitionParser.HandlerMappingStrategy

Known Direct Implementers
org.springframework.web.socket.config.HandlersBeanDefinitionParser.WebSocketHandlerMappingStrategy, org.springframework.web.socket.config.HandlersBeanDefinitionParser.SockJsHandlerMappingStrategy

Method Summary

Modifier and TypeMethod and Description
public void
addMapping(Element mappingElement, ManagedMap<String, Object> map, ParserContext context)

Method Detail

addMappingback to summary
public void addMapping(Element mappingElement, ManagedMap<String, Object> map, ParserContext context)
org.springframework.web.socket.config back to summary

private Class HandlersBeanDefinitionParser.SockJsHandlerMappingStrategy

extends Object
implements HandlerMappingStrategy
Class Inheritance
  • java.lang.Object
  • org.springframework.web.socket.config.HandlersBeanDefinitionParser.SockJsHandlerMappingStrategy
All Implemented Interfaces
org.springframework.web.socket.config.HandlersBeanDefinitionParser.HandlerMappingStrategy

Field Summary

Modifier and TypeField and Description
private final RuntimeBeanReference

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sockJsServiceback to summary
private final RuntimeBeanReference sockJsService

Constructor Detail

SockJsHandlerMappingStrategyback to summary
public SockJsHandlerMappingStrategy(RuntimeBeanReference sockJsService)

Method Detail

addMappingback to summary
public void addMapping(Element element, ManagedMap<String, Object> urlMap, ParserContext context)

Implements org.springframework.web.socket.config.HandlersBeanDefinitionParser.HandlerMappingStrategy.addMapping.

Annotations
@Override
org.springframework.web.socket.config back to summary

private Class HandlersBeanDefinitionParser.WebSocketHandlerMappingStrategy

extends Object
implements HandlerMappingStrategy
Class Inheritance
  • java.lang.Object
  • org.springframework.web.socket.config.HandlersBeanDefinitionParser.WebSocketHandlerMappingStrategy
All Implemented Interfaces
org.springframework.web.socket.config.HandlersBeanDefinitionParser.HandlerMappingStrategy

Field Summary

Modifier and TypeField and Description
private final RuntimeBeanReference
private final ManagedList<?>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

handshakeHandlerReferenceback to summary
private final RuntimeBeanReference handshakeHandlerReference
interceptorsListback to summary
private final ManagedList<?> interceptorsList

Constructor Detail

WebSocketHandlerMappingStrategyback to summary
public WebSocketHandlerMappingStrategy(RuntimeBeanReference handshakeHandler, ManagedList<?> interceptors)

Method Detail

addMappingback to summary
public void addMapping(Element element, ManagedMap<String, Object> urlMap, ParserContext context)

Implements org.springframework.web.socket.config.HandlersBeanDefinitionParser.HandlerMappingStrategy.addMapping.

Annotations
@Override