@CompileStatic class SockJSHandler
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
(Object delegate) |
| Type | Name and description |
|---|---|
SockJSHandler |
bridge(Map<String, Object> bridgeOptions = [:])Bridge the SockJS handler to the Vert.x event bus. |
SockJSHandler |
bridge(Map<String, Object> bridgeOptions = [:], 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, Map<String, Object> options)Create a SockJS handler |
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(Handler<SockJSSocket> handler)Set a SockJS socket handler. |
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 handlerio.vertx:vertx-web:3.1.0