public class DefaultSockJSServer extends java.lang.Object implements SockJSServer
Constructor and Description |
---|
DefaultSockJSServer(VertxInternal vertx,
HttpServer httpServer) |
Modifier and Type | Method and Description |
---|---|
void |
bridge(JsonObject sjsConfig,
JsonArray inboundPermitted,
JsonArray outboundPermitted)
Install an app which bridges the SockJS server to the event bus
|
void |
bridge(JsonObject sjsConfig,
JsonArray inboundPermitted,
JsonArray outboundPermitted,
long authTimeout)
Install an app which bridges the SockJS server to the event bus
|
void |
bridge(JsonObject sjsConfig,
JsonArray inboundPermitted,
JsonArray outboundPermitted,
long authTimeout,
java.lang.String authAddress)
Install an app which bridges the SockJS server to the event bus
|
void |
installApp(JsonObject config,
Handler<SockJSSocket> sockHandler)
Install an application
|
void |
installTestApplications() |
static void |
main(java.lang.String[] args) |
public DefaultSockJSServer(VertxInternal vertx, HttpServer httpServer)
public void installApp(JsonObject config, Handler<SockJSSocket> sockHandler)
SockJSServer
installApp
in interface SockJSServer
config
- The application configurationsockHandler
- A handler that will be called when new SockJS sockets are createdpublic void bridge(JsonObject sjsConfig, JsonArray inboundPermitted, JsonArray outboundPermitted)
SockJSServer
bridge
in interface SockJSServer
sjsConfig
- The config for the appinboundPermitted
- A list of JSON objects which define permitted matches for inbound (client->server) trafficoutboundPermitted
- A list of JSON objects which define permitted matches for outbound (server->client)
trafficpublic void bridge(JsonObject sjsConfig, JsonArray inboundPermitted, JsonArray outboundPermitted, long authTimeout)
SockJSServer
bridge
in interface SockJSServer
sjsConfig
- The config for the appinboundPermitted
- A list of JSON objects which define permitted matches for inbound (client->server) trafficoutboundPermitted
- A list of JSON objects which define permitted matches for outbound (server->client)
trafficauthTimeout
- Default time an authorisation will be cached for in the bridge (defaults to 5 minutes)public void bridge(JsonObject sjsConfig, JsonArray inboundPermitted, JsonArray outboundPermitted, long authTimeout, java.lang.String authAddress)
SockJSServer
bridge
in interface SockJSServer
sjsConfig
- The config for the appinboundPermitted
- A list of JSON objects which define permitted matches for inbound (client->server) trafficoutboundPermitted
- A list of JSON objects which define permitted matches for outbound (server->client)
trafficauthTimeout
- 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'public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public void installTestApplications()