org.vertx.java.core.sockjs

## Class EventBusBridge

- java.lang.Object
- - org.vertx.java.core.sockjs.EventBusBridge

All Implemented Interfaces:
  Handler<SockJSSocket>

    public class EventBusBridge
    extends java.lang.Object
    implements Handler<SockJSSocket>

Bridges the event bus to the client side

### Constructor Summary

Constructors
Constructor and Description
`EventBusBridge(Vertx vertx, JsonArray inboundPermitted, JsonArray outboundPermitted)`
`EventBusBridge(Vertx vertx, JsonArray inboundPermitted, JsonArray outboundPermitted, long authTimeout)`
`EventBusBridge(Vertx vertx, JsonArray inboundPermitted, JsonArray outboundPermitted, long authTimeout, java.lang.String authAddress)`

### Method Summary

Methods
`void` `handle(SockJSSocket sock)` Something has happened, so handle it.
`protected boolean` `handleRegister(SockJSSocket sock, java.lang.String address)` Client is registering a handler
`protected boolean` `handleSendOrPub(SockJSSocket sock, boolean send, JsonObject msg, java.lang.String address)` Client is sending or publishing on the socket
`protected void` `handleSocketClosed(SockJSSocket sock)` The socket has been closed
`protected boolean` `handleUnregister(SockJSSocket sock, java.lang.String address)` Client is unregistering a handler

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### EventBusBridge

    public EventBusBridge(Vertx vertx,
                  JsonArray inboundPermitted,
                  JsonArray outboundPermitted)

#### EventBusBridge

    public EventBusBridge(Vertx vertx,
                  JsonArray inboundPermitted,
                  JsonArray outboundPermitted,
                  long authTimeout)

#### EventBusBridge

    public EventBusBridge(Vertx vertx,
                  JsonArray inboundPermitted,
                  JsonArray outboundPermitted,
                  long authTimeout,
                  java.lang.String authAddress)

### Method Detail

#### handle

    public void handle(SockJSSocket sock)

Description copied from interface: `Handler`
Something has happened, so handle it.

Specified by:
  `handle` in interface `Handler<SockJSSocket>`

#### handleSocketClosed

    protected void handleSocketClosed(SockJSSocket sock)

The socket has been closed

Parameters:
  `sock` - The socket

#### handleSendOrPub

    protected boolean handleSendOrPub(SockJSSocket sock,
                          boolean send,
                          JsonObject msg,
                          java.lang.String address)

Client is sending or publishing on the socket

Parameters:
  `sock` - The sock
  `send` - if true it's a send else it's a publish
  `msg` - The message
  `address` - The address the message is being sent/published to
Returns:
  true To allow the send/publish to occur, false otherwise

#### handleRegister

    protected boolean handleRegister(SockJSSocket sock,
                         java.lang.String address)

Client is registering a handler

Parameters:
  `sock` - The socket
  `address` - The address
Returns:
  true to let the registration occur, false otherwise

#### handleUnregister

    protected boolean handleUnregister(SockJSSocket sock,
                           java.lang.String address)

Client is unregistering a handler

Parameters:
  `sock` - The socket
  `address` - The address