public class EventBusBridge extends java.lang.Object implements Handler<SockJSSocket>
Instances of this class are not thread-safe.
| 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) |
| Modifier and Type | Method and Description |
|---|---|
EventBusBridgeHook |
getHook() |
void |
handle(SockJSSocket sock)
Something has happened, so handle it.
|
protected void |
handlePostRegister(SockJSSocket sock,
java.lang.String address)
Called after client has registered
|
protected boolean |
handlePreRegister(SockJSSocket sock,
java.lang.String address)
Client is about to register 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
|
void |
setHook(EventBusBridgeHook hook) |
public EventBusBridge(Vertx vertx, JsonArray inboundPermitted, JsonArray outboundPermitted)
public EventBusBridge(Vertx vertx, JsonArray inboundPermitted, JsonArray outboundPermitted, long authTimeout)
public void handle(SockJSSocket sock)
Handlerhandle in interface Handler<SockJSSocket>public void setHook(EventBusBridgeHook hook)
public EventBusBridgeHook getHook()
protected void handleSocketClosed(SockJSSocket sock)
sock - The socketprotected boolean handleSendOrPub(SockJSSocket sock, boolean send, JsonObject msg, java.lang.String address)
sock - The socksend - if true it's a send else it's a publishmsg - The messageaddress - The address the message is being sent/published toprotected boolean handlePreRegister(SockJSSocket sock, java.lang.String address)
sock - The socketaddress - The addressprotected void handlePostRegister(SockJSSocket sock, java.lang.String address)
sock - The socketaddress - The addressprotected boolean handleUnregister(SockJSSocket sock, java.lang.String address)
sock - The socketaddress - The address