public interface WebSocketServletFactory
| Modifier and Type | Interface | Description |
|---|---|---|
static class |
WebSocketServletFactory.Loader |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
acceptWebSocket(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
|
boolean |
acceptWebSocket(WebSocketCreator creator,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
|
WebSocketCreator |
getCreator() |
|
ExtensionFactory |
getExtensionFactory() |
|
WebSocketPolicy |
getPolicy() |
Get the base policy in use for WebSockets.
|
boolean |
isUpgradeRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
|
void |
register(java.lang.Class<?> websocketPojo) |
Register a websocket class pojo with the default
WebSocketCreator. |
void |
setCreator(WebSocketCreator creator) |
|
void |
start() |
|
void |
stop() |
boolean acceptWebSocket(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
java.io.IOExceptionboolean acceptWebSocket(WebSocketCreator creator, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
java.io.IOExceptionvoid start()
throws java.lang.Exception
java.lang.Exceptionvoid stop() throws java.lang.Exception
java.lang.ExceptionWebSocketCreator getCreator()
ExtensionFactory getExtensionFactory()
WebSocketPolicy getPolicy()
Note: individual WebSocket implementations can override some of the values in here by using the @WebSocket annotation.
boolean isUpgradeRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
void register(java.lang.Class<?> websocketPojo)
WebSocketCreator.
Note: only required if using the default WebSocketCreator provided by this factory.
websocketPojo - the class to instantiate for each incoming websocket upgrade request.void setCreator(WebSocketCreator creator)
Copyright © 1995–2017 Webtide. All rights reserved.