Interface SockJSHandler
public interface 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:
- Author:
- Tim Fox, Paulo Lopes
-
Method Summary
Modifier and TypeMethodDescriptionbridge(AuthorizationProvider authorizationProvider, SockJSBridgeOptions bridgeOptions, Handler<BridgeEvent> bridgeEventHandler) Likebridge(SockJSBridgeOptions)but specifying a handler that will receive bridge events.default Routerbridge(SockJSBridgeOptions bridgeOptions) Bridge the SockJS handler to the Vert.x event bus.default Routerbridge(SockJSBridgeOptions bridgeOptions, Handler<BridgeEvent> bridgeEventHandler) Likebridge(SockJSBridgeOptions)but specifying a handler that will receive bridge events.static SockJSHandlerCreate a SockJS handlerstatic SockJSHandlercreate(Vertx vertx, SockJSHandlerOptions options) Create a SockJS handlersocketHandler(Handler<SockJSSocket> handler) Set a SockJS socket handler.
-
Method Details
-
create
Create a SockJS handler- Parameters:
vertx- the Vert.x instance- Returns:
- the handler
-
create
Create a SockJS handler- Parameters:
vertx- the Vert.x instanceoptions- options to configure the handler- Returns:
- the handler
-
socketHandler
Set a SockJS socket handler. This handler will be called with a SockJS socket whenever a SockJS connection is made from a client- Parameters:
handler- the handler- Returns:
- a router to be mounted on an existing router
-
bridge
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- Parameters:
bridgeOptions- options to configure the bridge with- Returns:
- a router to be mounted on an existing router
-
bridge
Router bridge(AuthorizationProvider authorizationProvider, SockJSBridgeOptions bridgeOptions, Handler<BridgeEvent> bridgeEventHandler) Likebridge(SockJSBridgeOptions)but specifying a handler that will receive bridge events.- Parameters:
authorizationProvider- authorization provider to be used on the bridgebridgeOptions- options to configure the bridge withbridgeEventHandler- handler to receive bridge events- Returns:
- a router to be mounted on an existing router
-
bridge
Likebridge(SockJSBridgeOptions)but specifying a handler that will receive bridge events.- Parameters:
bridgeOptions- options to configure the bridge withbridgeEventHandler- handler to receive bridge events- Returns:
- a router to be mounted on an existing router
-