org.springframework.web.socket.server.standard

## 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 `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 `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
Constructor and Description
`ServletServerContainerFactoryBean()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `afterPropertiesSet()`
`Long` `getAsyncSendTimeout()`
`Integer` `getMaxBinaryMessageBufferSize()`
`Long` `getMaxSessionIdleTimeout()`
`Integer` `getMaxTextMessageBufferSize()`
`ServerContainer` `getObject()`
`Class<?>` `getObjectType()`
`boolean` `isSingleton()`
`void` `setAsyncSendTimeout(Long timeoutInMillis)`
`void` `setMaxBinaryMessageBufferSize(Integer bufferSize)`
`void` `setMaxSessionIdleTimeout(Long timeoutInMillis)`
`void` `setMaxTextMessageBufferSize(Integer bufferSize)`
`void` `setServletContext(ServletContext servletContext)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ServletServerContainerFactoryBean

    public ServletServerContainerFactoryBean()

### Method Detail

#### setAsyncSendTimeout

    public void setAsyncSendTimeout(Long timeoutInMillis)

#### getAsyncSendTimeout

    @Nullable
    public Long getAsyncSendTimeout()

#### setMaxSessionIdleTimeout

    public void setMaxSessionIdleTimeout(Long timeoutInMillis)

#### getMaxSessionIdleTimeout

    @Nullable
    public Long getMaxSessionIdleTimeout()

#### setMaxTextMessageBufferSize

    public void setMaxTextMessageBufferSize(Integer bufferSize)

#### getMaxTextMessageBufferSize

    @Nullable
    public Integer getMaxTextMessageBufferSize()

#### setMaxBinaryMessageBufferSize

    public void setMaxBinaryMessageBufferSize(Integer bufferSize)

#### getMaxBinaryMessageBufferSize

    @Nullable
    public Integer getMaxBinaryMessageBufferSize()

#### setServletContext

    public void setServletContext(ServletContext servletContext)

Specified by:
  `setServletContext` in interface `org.springframework.web.context.ServletContextAware`

#### afterPropertiesSet

    public void afterPropertiesSet()

Specified by:
  `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`

#### getObject

    @Nullable
    public ServerContainer getObject()

Specified by:
  `getObject` in interface `org.springframework.beans.factory.FactoryBean<WebSocketContainer>`

#### getObjectType

    public Class<?> getObjectType()

Specified by:
  `getObjectType` in interface `org.springframework.beans.factory.FactoryBean<WebSocketContainer>`

#### isSingleton

    public boolean isSingleton()

Specified by:
  `isSingleton` in interface `org.springframework.beans.factory.FactoryBean<WebSocketContainer>`