org.vertx.scala.core.sockjs

SockJSServer

final class SockJSServer extends Self

This is an implementation of the server side part of SockJS.

SockJS enables browsers to communicate with the server using a simple WebSocket-like api for sending and receiving messages. Under the bonnet SockJS chooses to use one of several protocols depending on browser capabilities and what appears to be working across the network.

Available protocols include:

This means, it should just work irrespective of what browser is being used, and whether there are nasty things like proxies and load balancers between the client and the server.

For more detailed information on SockJS, see their website.

On the server side, you interact using instances of org.vertx.scala.core.sockjs.SockJSSocket - this allows you to send data to the client or receive data via the org.vertx.scala.core.sockjs.SockJSSocket.dataHandler().

You can register multiple applications with the same SockJSServer, each using different path prefixes, each application will have its own handler, and configuration.

Instances of this class are not thread-safe.

Linear Supertypes
Self, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SockJSServer
  2. Self
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val asJava: java.core.sockjs.SockJSServer

  8. def bridge(sjsConfig: JsonObject, inboundPermitted: JsonArray, outboundPermitted: JsonArray, bridgeConfig: JsonObject): SockJSServer

    Install an app which bridges the SockJS server to the event bus

    Install an app which bridges the SockJS server to the event bus

    sjsConfig

    The config for the app

    inboundPermitted

    A list of JSON objects which define permitted matches for inbound (client->server) traffic

    outboundPermitted

    A list of JSON objects which define permitted matches for outbound (server->client) traffic

    bridgeConfig

    JSON object holding config for the EventBusBridge

  9. def bridge(sjsConfig: JsonObject, inboundPermitted: JsonArray, outboundPermitted: JsonArray, authTimeout: Long, authAddress: String): SockJSServer

    Install an app which bridges the SockJS server to the event bus

    Install an app which bridges the SockJS server to the event bus

    sjsConfig

    The config for the app

    inboundPermitted

    A list of JSON objects which define permitted matches for inbound (client->server) traffic

    outboundPermitted

    A list of JSON objects which define permitted matches for outbound (server->client) traffic

    authTimeout

    Default time an authorisation will be cached for in the bridge (defaults to 5 minutes)

    authAddress

    Address of auth manager. Defaults to 'vertx.basicauthmanager.authorise'

  10. def bridge(sjsConfig: JsonObject, inboundPermitted: JsonArray, outboundPermitted: JsonArray, authTimeout: Long): SockJSServer

    Install an app which bridges the SockJS server to the event bus

    Install an app which bridges the SockJS server to the event bus

    sjsConfig

    The config for the app

    inboundPermitted

    A list of JSON objects which define permitted matches for inbound (client->server) traffic

    outboundPermitted

    A list of JSON objects which define permitted matches for outbound (server->client) traffic

    authTimeout

    Default time an authorisation will be cached for in the bridge (defaults to 5 minutes)

  11. def bridge(sjsConfig: JsonObject, inboundPermitted: JsonArray, outboundPermitted: JsonArray): SockJSServer

    Install an app which bridges the SockJS server to the event bus

    Install an app which bridges the SockJS server to the event bus

    sjsConfig

    The config for the app

    inboundPermitted

    A list of JSON objects which define permitted matches for inbound (client->server) traffic

    outboundPermitted

    A list of JSON objects which define permitted matches for outbound (server->client) traffic

  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. def installApp(config: JsonObject, sockHandler: (SockJSSocket) ⇒ Unit): SockJSServer

    Install an application

    Install an application

    config

    The application configuration

    sockHandler

    A handler that will be called when new SockJS sockets are created

  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. def setHook(hook: EventBusBridgeHook): SockJSServer

    Set a EventBusBridgeHook on the SockJS server

    Set a EventBusBridgeHook on the SockJS server

    hook

    The hook

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. def wrap[X](doStuff: ⇒ X): SockJSServer.this.type

    Helper method wrapping invocations and returning the Scala type, once again to help provide fluent return types

    Helper method wrapping invocations and returning the Scala type, once again to help provide fluent return types

    Attributes
    protected[this]
    Definition Classes
    Self

Inherited from Self

Inherited from AnyRef

Inherited from Any

Ungrouped