Package: io.vertx.groovy.ext.web.handler.sockjs

## [Groovy] Class SockJSHandler

- io.vertx.groovy.ext.web.handler.sockjs.SockJSHandler

- All Implemented Interfaces and Traits:
    Handler

      @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 Summary

    Constructors
    Constructor and description
    `SockJSHandler (Object delegate)`

  - ### Methods Summary

    Methods
    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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Constructor Detail

    - #### SockJSHandler(Object delegate)

  - ### Method Detail

    - #### SockJSHandler bridge(Map<String, Object> 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

      Returns:
        a reference to this, so the API can be used fluently
      Parameters:
        `bridgeOptions` - options to configure the bridge with (see BridgeOptions)

    - #### SockJSHandler bridge(Map<String, Object> bridgeOptions = [:], Handler<BridgeEvent> bridgeEventHandler)

      Like SockJSHandler.bridge but specifying a handler that will receive bridge events.

      Returns:
        a reference to this, so the API can be used fluently
      Parameters:
        `bridgeOptions` - options to configure the bridge with (see BridgeOptions)
        `bridgeEventHandler` - handler to receive bridge events

    - #### static SockJSHandler create(Vertx vertx)

      Create a SockJS handler

      Returns:
        the handler
      Parameters:
        `vertx` - the Vert.x instance

    - #### static SockJSHandler create(Vertx vertx, Map<String, Object> options)

      Create a SockJS handler

      Returns:
        the handler
      Parameters:
        `vertx` - the Vert.x instance
        `options` - options to configure the handler (see SockJSHandlerOptions)

    - #### 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

      Parameters:
        `router` - the router to install on
        `vertx` - the Vert.x instance

    - #### SockJSHandler 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

      Returns:
        a reference to this, so the API can be used fluently
      Parameters:
        `handler` - the handler