Class ServletServerContainerFactoryBean
java.lang.Object
org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.FactoryBean<WebSocketContainer>,org.springframework.beans.factory.InitializingBean,org.springframework.web.context.ServletContextAware
public class ServletServerContainerFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean<WebSocketContainer>, org.springframework.web.context.ServletContextAware, org.springframework.beans.factory.InitializingBean
A
FactoryBean for configuring ServerContainer.
Since there is usually only one ServerContainer instance accessible under a
well-known jakarta.servlet.ServletContext attribute, simply declaring this
FactoryBean and using its setters allows for configuring the ServerContainer
through Spring configuration.
This is useful even if the ServerContainer is not injected into any other
bean within the Spring application context. For example, an application can configure
a DefaultHandshakeHandler,
a SockJsService, or
ServerEndpointExporter, and separately declare this FactoryBean in order
to customize the properties of the (one and only) ServerContainer instance.
- Since:
- 4.0
- Author:
- Rossen Stoyanchev, Sam Brannen
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClass<?>booleanvoidsetAsyncSendTimeout(Long timeoutInMillis) voidsetMaxBinaryMessageBufferSize(Integer bufferSize) voidsetMaxSessionIdleTimeout(Long timeoutInMillis) voidsetMaxTextMessageBufferSize(Integer bufferSize) voidsetServletContext(ServletContext servletContext)
-
Constructor Details
-
ServletServerContainerFactoryBean
public ServletServerContainerFactoryBean()
-
-
Method Details
-
setAsyncSendTimeout
-
getAsyncSendTimeout
-
setMaxSessionIdleTimeout
-
getMaxSessionIdleTimeout
-
setMaxTextMessageBufferSize
-
getMaxTextMessageBufferSize
-
setMaxBinaryMessageBufferSize
-
getMaxBinaryMessageBufferSize
-
setServletContext
- Specified by:
setServletContextin interfaceorg.springframework.web.context.ServletContextAware
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
getObject
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<WebSocketContainer>
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<WebSocketContainer>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<WebSocketContainer>
-