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(int bufferSize) |
void |
setMaxSessionIdleTimeout(long timeoutInMillis) |
void |
setMaxTextMessageBufferSize(int bufferSize) |
void |
setServletContext(ServletContext servletContext) |
public void setAsyncSendTimeout(long timeoutInMillis)
public long getAsyncSendTimeout()
public void setMaxSessionIdleTimeout(long timeoutInMillis)
public Long getMaxSessionIdleTimeout()
public void setMaxTextMessageBufferSize(int bufferSize)
public Integer getMaxTextMessageBufferSize()
public void setMaxBinaryMessageBufferSize(int bufferSize)
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.InitializingBeanpublic 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>