spring-framework / org.springframework.web.socket.server.standard / ServletServerContainerFactoryBean

ServletServerContainerFactoryBean

open class ServletServerContainerFactoryBean : FactoryBean<WebSocketContainer>, ServletContextAware, InitializingBean

A FactoryBean for configuring javax.websocket.server.ServerContainer. Since there is usually only one ServerContainer instance accessible under a well-known javax.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 org.springframework.web.socket.server.support.DefaultHandshakeHandler, a org.springframework.web.socket.sockjs.SockJsService, or ServerEndpointExporter, and separately declare this FactoryBean in order to customize the properties of the (one and only) ServerContainer instance.

Author
Rossen Stoyanchev

Author
Sam Brannen

Since
4.0

Constructors

<init>

ServletServerContainerFactoryBean()

A FactoryBean for configuring javax.websocket.server.ServerContainer. Since there is usually only one ServerContainer instance accessible under a well-known javax.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 org.springframework.web.socket.server.support.DefaultHandshakeHandler, a org.springframework.web.socket.sockjs.SockJsService, or ServerEndpointExporter, and separately declare this FactoryBean in order to customize the properties of the (one and only) ServerContainer instance.

Functions

afterPropertiesSet

open fun afterPropertiesSet(): Unit

getAsyncSendTimeout

open fun getAsyncSendTimeout(): Long

getMaxBinaryMessageBufferSize

open fun getMaxBinaryMessageBufferSize(): Int

getMaxSessionIdleTimeout

open fun getMaxSessionIdleTimeout(): Long

getMaxTextMessageBufferSize

open fun getMaxTextMessageBufferSize(): Int

getObject

open fun getObject(): ServerContainer

getObjectType

open fun getObjectType(): Class<*>

isSingleton

open fun isSingleton(): Boolean

setAsyncSendTimeout

open fun setAsyncSendTimeout(timeoutInMillis: Long): Unit

setMaxBinaryMessageBufferSize

open fun setMaxBinaryMessageBufferSize(bufferSize: Int): Unit

setMaxSessionIdleTimeout

open fun setMaxSessionIdleTimeout(timeoutInMillis: Long): Unit

setMaxTextMessageBufferSize

open fun setMaxTextMessageBufferSize(bufferSize: Int): Unit

setServletContext

open fun setServletContext(servletContext: ServletContext): Unit