@groovy.transform.CompileStatic class SockJSHandler extends java.lang.Object
A handler that allows you to handle SockJS connections from clients.
We currently support version 0.3.3 of the SockJS protocol, which can be found in this tag:
Constructor and description |
---|
SockJSHandler
(java.lang.Object delegate) |
Type | Name and description |
---|---|
SockJSHandler |
bridge(java.util.Map<java.lang.String, java.lang.Object> bridgeOptions = [:]) Bridge the SockJS handler to the Vert.x event bus. |
SockJSHandler |
bridge(java.util.Map<java.lang.String, java.lang.Object> bridgeOptions = [:], io.vertx.core.Handler<BridgeEvent> bridgeEventHandler) Like SockJSHandler.bridge but specifying a handler that will receive bridge events. |
static SockJSHandler |
create(Vertx vertx) Create a SockJS handler |
static SockJSHandler |
create(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> options) Create a SockJS handler |
java.lang.Object |
getDelegate() |
void |
handle(RoutingContext arg0) |
static void |
installTestApplications(Router router, Vertx vertx) Install SockJS test applications on a router - used when running the SockJS test suite |
SockJSHandler |
socketHandler(io.vertx.core.Handler<SockJSSocket> handler) Set a SockJS socket handler. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Bridge the SockJS handler to the Vert.x event bus. This basically installs a built-in SockJS socket handler which takes SockJS traffic and bridges it to the event bus, thus allowing you to extend the server-side Vert.x event bus to browsers
bridgeOptions
- options to configure the bridge with (see BridgeOptions)Like SockJSHandler.bridge but specifying a handler that will receive bridge events.
bridgeOptions
- options to configure the bridge with (see BridgeOptions)bridgeEventHandler
- handler to receive bridge eventsCreate a SockJS handler
vertx
- the Vert.x instanceCreate a SockJS handler
vertx
- the Vert.x instanceoptions
- options to configure the handler (see SockJSHandlerOptions)Install SockJS test applications on a router - used when running the SockJS test suite
router
- the router to install onvertx
- the Vert.x instanceSet a SockJS socket handler. This handler will be called with a SockJS socket whenever a SockJS connection is made from a client
handler
- the handler