WebSocketApplications registration, responsible
for client and server handshake validation.
WebSocket, WebSocketApplication
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final HashMap | |
| private final List | |
| private final HashMap | |
| public static final int | |
| public static final Version | |
| private static final String[] | |
| private static final WebSocketEngine | |
| private final HashMap | |
| pack-priv static final Logger | |
| private Mapper | |
| private final HttpResponsePacket. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public WebSocketApplication | |
| private WebSocketEngine. | |
| private static String | |
| public static WebSocketEngine | |
| private void | |
| public static ProtocolHandler | |
| public synchronized void | register(final String
the context path (per servlet rules) contextPath, final String url pattern (per servlet rules) urlPattern, final WebSocketApplication the WebSocket application. app)Register a WebSocketApplication to a specific context path and url pattern. |
| public synchronized void | |
| public synchronized void | |
| public synchronized void | |
| public boolean | |
| public boolean |
| applicationMap | back to summary |
|---|---|
| private final HashMap<WebSocketApplication, String> applicationMap | |
| applications | back to summary |
|---|---|
| private final List<WebSocketApplication> applications | |
| contextApplications | back to summary |
|---|---|
| private final HashMap<String, List<WebSocketApplication>> contextApplications | |
| DEFAULT_TIMEOUT | back to summary |
|---|---|
| public static final int DEFAULT_TIMEOUT | |
| DEFAULT_VERSION | back to summary |
|---|---|
| public static final Version DEFAULT_VERSION | |
| EMPTY_STRING_ARRAY | back to summary |
|---|---|
| private static final String[] EMPTY_STRING_ARRAY | |
| engine | back to summary |
|---|---|
| private static final WebSocketEngine engine | |
| fullPathToApplication | back to summary |
|---|---|
| private final HashMap<String, WebSocketApplication> fullPathToApplication | |
| logger | back to summary |
|---|---|
| pack-priv static final Logger logger | |
| mapper | back to summary |
|---|---|
| private Mapper mapper | |
| unsupportedVersionsResponseBuilder | back to summary |
|---|---|
| private final HttpResponsePacket. | |
| WebSocketEngine | back to summary |
|---|---|
| private WebSocketEngine() | |
| getApplication | back to summary |
|---|---|
| public WebSocketApplication getApplication(HttpRequestPacket request) | |
| getApplication | back to summary |
|---|---|
| private WebSocketEngine. | |
| getContextPath | back to summary |
|---|---|
| private static String getContextPath(String mapping) | |
| getEngine | back to summary |
|---|---|
| public static WebSocketEngine getEngine() | |
| handleUnsupportedVersion | back to summary |
|---|---|
| private void handleUnsupportedVersion(final FilterChainContext ctx, final HttpRequestPacket request) throws IOException | |
| loadHandler | back to summary |
|---|---|
| public static ProtocolHandler loadHandler(MimeHeaders headers) | |
| register | back to summary |
|---|---|
| public synchronized void register(final String contextPath, final String urlPattern, final WebSocketApplication app) Register a WebSocketApplication to a specific context path and url pattern. If you wish to associate this application with the root context, use an empty string for the contextPath argument.
Examples:
// WS application will be invoked:
// ws://localhost:8080/echo
// WS application will not be invoked:
// ws://localhost:8080/foo/echo
// ws://localhost:8080/echo/some/path
register("", "/echo", webSocketApplication);
// WS application will be invoked:
// ws://localhost:8080/echo
// ws://localhost:8080/echo/some/path
// WS application will not be invoked:
// ws://localhost:8080/foo/echo
register("", "/echo/*", webSocketApplication);
// WS application will be invoked:
// ws://localhost:8080/context/echo
// WS application will not be invoked:
// ws://localhost:8080/echo
// ws://localhost:8080/context/some/path
register("/context", "/echo", webSocketApplication);
| |
| register | back to summary |
|---|---|
| public synchronized void register(WebSocketApplication app)
Deprecated
| |
| unregister | back to summary |
|---|---|
| public synchronized void unregister(WebSocketApplication app) | |
| unregisterAll | back to summary |
|---|---|
| public synchronized void unregisterAll() Un-registers all | |
| upgrade | back to summary |
|---|---|
| public boolean upgrade(FilterChainContext ctx, HttpContent requestContent) throws IOException | |
| upgrade | back to summary |
|---|---|
| public boolean upgrade(FilterChainContext ctx, HttpContent requestContent, Mapper mapper) throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| private final WebSocketApplication | |
| private final WebSocketMappingData |
| Access | Constructor and Description |
|---|---|
| public |
| app | back to summary |
|---|---|
| private final WebSocketApplication app | |
| mappingData | back to summary |
|---|---|
| private final WebSocketMappingData mappingData | |
| WebSocketApplicationReg | back to summary |
|---|---|
| public WebSocketApplicationReg(final WebSocketApplication app, final WebSocketMappingData mappingData) | |