public class ServletServerContainerFactoryBean
extends java.lang.Object
implements org.springframework.beans.factory.FactoryBean<javax.websocket.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() |
java.lang.Long |
getAsyncSendTimeout() |
java.lang.Integer |
getMaxBinaryMessageBufferSize() |
java.lang.Long |
getMaxSessionIdleTimeout() |
java.lang.Integer |
getMaxTextMessageBufferSize() |
javax.websocket.server.ServerContainer |
getObject() |
java.lang.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 java.lang.Long getAsyncSendTimeout()
public void setMaxSessionIdleTimeout(long timeoutInMillis)
public java.lang.Long getMaxSessionIdleTimeout()
public void setMaxTextMessageBufferSize(int bufferSize)
public java.lang.Integer getMaxTextMessageBufferSize()
public void setMaxBinaryMessageBufferSize(int bufferSize)
public java.lang.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 java.lang.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>