Class SockJSHandler
- java.lang.Object
-
- io.vertx.reactivex.ext.web.handler.sockjs.SockJSHandler
-
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
public class SockJSHandler extends Object implements io.vertx.lang.rx.RxDelegate
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<SockJSHandler>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description SockJSHandler(SockJSHandler delegate)SockJSHandler(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Routerbridge(SockJSBridgeOptions bridgeOptions)Bridge the SockJS handler to the Vert.x event bus.Routerbridge(SockJSBridgeOptions bridgeOptions, Handler<BridgeEvent> bridgeEventHandler)Likebridge(io.vertx.ext.web.handler.sockjs.SockJSBridgeOptions)but specifying a handler that will receive bridge events.Routerbridge(AuthorizationProvider authorizationProvider, SockJSBridgeOptions bridgeOptions, Handler<BridgeEvent> bridgeEventHandler)Likebridge(io.vertx.ext.web.handler.sockjs.SockJSBridgeOptions)but specifying a handler that will receive bridge events.static SockJSHandlercreate(Vertx vertx)Create a SockJS handlerstatic SockJSHandlercreate(Vertx vertx, SockJSHandlerOptions options)Create a SockJS handlerbooleanequals(Object o)SockJSHandlergetDelegate()inthashCode()static SockJSHandlernewInstance(SockJSHandler arg)RoutersocketHandler(Handler<SockJSSocket> handler)Set a SockJS socket handler.StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<SockJSHandler> __TYPE_ARG
-
-
Constructor Detail
-
SockJSHandler
public SockJSHandler(SockJSHandler delegate)
-
SockJSHandler
public SockJSHandler(Object delegate)
-
-
Method Detail
-
getDelegate
public SockJSHandler getDelegate()
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
create
public static SockJSHandler create(Vertx vertx)
Create a SockJS handler- Parameters:
vertx- the Vert.x instance- Returns:
- the handler
-
create
public static SockJSHandler create(Vertx vertx, SockJSHandlerOptions options)
Create a SockJS handler- Parameters:
vertx- the Vert.x instanceoptions- options to configure the handler- Returns:
- the handler
-
socketHandler
public Router socketHandler(Handler<SockJSSocket> handler)
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
public Router bridge(SockJSBridgeOptions bridgeOptions)
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
public Router bridge(AuthorizationProvider authorizationProvider, SockJSBridgeOptions bridgeOptions, Handler<BridgeEvent> bridgeEventHandler)
Likebridge(io.vertx.ext.web.handler.sockjs.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
public Router bridge(SockJSBridgeOptions bridgeOptions, Handler<BridgeEvent> bridgeEventHandler)
Likebridge(io.vertx.ext.web.handler.sockjs.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
-
newInstance
public static SockJSHandler newInstance(SockJSHandler arg)
-
-