public class ServletServerContainerFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<javax.websocket.WebSocketContainer>, org.springframework.beans.factory.InitializingBean, org.springframework.web.context.ServletContextAware
ServerContainer. Since
there is only one ServerContainer instance accessible under a well-known
javax.servlet.ServletContext attribute, simply declaring this FactoryBean and
using its setters allows configuring the ServerContainer through Spring
configuration.
This is useful even if the ServerContainer is not injected into any other
bean. 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() |
javax.websocket.server.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 javax.websocket.server.ServerContainer getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<javax.websocket.WebSocketContainer>public Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<javax.websocket.WebSocketContainer>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<javax.websocket.WebSocketContainer>