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

## [Groovy] Class SockJSHandler

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

- All Implemented Interfaces and Traits:
    io.vertx.core.Handler

      @groovy.transform.CompileStatic
      class SockJSHandler
      extends java.lang.Object

  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 (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `SockJSHandler` | `bridge(java.util.Map<java.lang.String, java.lang.Object> bridgeOptions = [:])` Bridge the SockJS handler to the Vert.x event bus.
    `SockJSHandler` | `bridge(java.util.Map<java.lang.String, java.lang.Object> bridgeOptions = [:], io.vertx.core.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, java.util.Map<java.lang.String, java.lang.Object> options)` Create a SockJS handler
    `java.lang.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(io.vertx.core.Handler<SockJSSocket> handler)` Set a SockJS socket handler.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### SockJSHandler(java.lang.Object delegate)

  - ### Method Detail

    - #### SockJSHandler bridge(java.util.Map<java.lang.String, java.lang.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(java.util.Map<java.lang.String, java.lang.Object> bridgeOptions = [:], io.vertx.core.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, java.util.Map<java.lang.String, java.lang.Object> options)

      Create a SockJS handler

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

    - #### java.lang.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(io.vertx.core.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