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.IOException
boolean acceptWebSocket(WebSocketCreator creator, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
java.io.IOException
void start() throws java.lang.Exception
java.lang.Exception
void stop() throws java.lang.Exception
java.lang.Exception
WebSocketCreator 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–2018 Webtide. All rights reserved.