public class ServletServerContainerFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<WebSocketContainer>, org.springframework.web.context.ServletContextAware, org.springframework.beans.factory.InitializingBean
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.
| Constructor and Description |
|---|
ServletServerContainerFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
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) |
public void setAsyncSendTimeout(Long timeoutInMillis)
@Nullable public Long getAsyncSendTimeout()
public void setMaxSessionIdleTimeout(Long timeoutInMillis)
@Nullable public Long getMaxSessionIdleTimeout()
public void setMaxTextMessageBufferSize(Integer bufferSize)
@Nullable public Integer getMaxTextMessageBufferSize()
public void setMaxBinaryMessageBufferSize(Integer bufferSize)
@Nullable public Integer getMaxBinaryMessageBufferSize()
public void setServletContext(ServletContext servletContext)
setServletContext in interface org.springframework.web.context.ServletContextAwarepublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean@Nullable public ServerContainer getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<WebSocketContainer>public Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<WebSocketContainer>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<WebSocketContainer>