Class SockJSHandler

java.lang.Object
io.vertx.mutiny.ext.web.handler.sockjs.SockJSHandler
All Implemented Interfaces:
MutinyDelegate

public class SockJSHandler extends Object implements MutinyDelegate
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:

NOTE: This class has been automatically generated from the original non Mutiny-ified interface.

Author:
Tim Fox, Paulo Lopes
See Also:
  • SockJSHandler
  • Field Details

  • Constructor Details

    • SockJSHandler

      public SockJSHandler(io.vertx.ext.web.handler.sockjs.SockJSHandler delegate)
      Create a new instance of SockJSHandler delegating to the given (non-null) instance of SockJSHandler.
    • SockJSHandler

      public SockJSHandler(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.ext.web.handler.sockjs.SockJSHandler getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • 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, io.vertx.ext.web.handler.sockjs.SockJSHandlerOptions options)
      Create a SockJS handler
      Parameters:
      vertx - the Vert.x instance
      options - options to configure the handler
      Returns:
      the handler
    • socketHandler

      public Router socketHandler(Consumer<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(io.vertx.ext.web.handler.sockjs.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, io.vertx.ext.web.handler.sockjs.SockJSBridgeOptions bridgeOptions, Consumer<BridgeEvent> bridgeEventHandler)
      Like bridge(SockJSBridgeOptions) but specifying a handler that will receive bridge events.
      Parameters:
      authorizationProvider - authorization provider to be used on the bridge
      bridgeOptions - options to configure the bridge with
      bridgeEventHandler - handler to receive bridge events
      Returns:
      a router to be mounted on an existing router
    • bridge

      public Router bridge(io.vertx.ext.web.handler.sockjs.SockJSBridgeOptions bridgeOptions, Consumer<BridgeEvent> bridgeEventHandler)
      Like bridge(SockJSBridgeOptions) but specifying a handler that will receive bridge events.
      Parameters:
      bridgeOptions - options to configure the bridge with
      bridgeEventHandler - handler to receive bridge events
      Returns:
      a router to be mounted on an existing router
    • newInstance

      public static SockJSHandler newInstance(io.vertx.ext.web.handler.sockjs.SockJSHandler delegate)
      Creates a new instance of the SockJSHandler.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object