- upgrade vertx
This commit is contained in:
parent
107e664c5b
commit
48b951b086
@ -41,6 +41,7 @@ libraryDependencies ++= {
|
||||
val scalaV = "2.12.2"
|
||||
val akkaVersion = "2.5.1"
|
||||
val scalaTestV = "2.2.6"
|
||||
val vertxV = "3.5.1"
|
||||
|
||||
Seq(
|
||||
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
|
||||
@ -52,9 +53,10 @@ libraryDependencies ++= {
|
||||
"commons-codec" % "commons-codec" % "1.8",
|
||||
"joda-time" % "joda-time" % "2.3",
|
||||
"com.google.code.gson" % "gson" % "2.8.0",
|
||||
"io.vertx" % "vertx-web" % "3.1.0",
|
||||
"io.vertx" % "vertx-auth-common" % "3.1.0",
|
||||
"io.vertx" % "vertx-auth-shiro" % "3.1.0",
|
||||
"io.vertx" % "vertx-web" % vertxV,
|
||||
"io.vertx" % "vertx-auth-common" % vertxV,
|
||||
"io.vertx" % "vertx-auth-shiro" % vertxV,
|
||||
"io.vertx" %% "vertx-lang-scala" % vertxV,
|
||||
"com.github.etaty" % "rediscala_2.12" % "1.8.0",
|
||||
"com.softwaremill.quicklens" %% "quicklens" % "1.4.8",
|
||||
"org.bigbluebutton" % "bbb-common-message_2.12" % "0.0.19-SNAPSHOT",
|
||||
|
@ -4,7 +4,7 @@ import io.vertx.core.AbstractVerticle;
|
||||
import io.vertx.core.eventbus.EventBus;
|
||||
import io.vertx.ext.web.Router;
|
||||
import io.vertx.ext.web.handler.StaticHandler;
|
||||
import io.vertx.ext.web.handler.sockjs.BridgeEventType;
|
||||
import io.vertx.ext.bridge.BridgeEventType;
|
||||
import io.vertx.ext.web.handler.sockjs.BridgeOptions;
|
||||
import io.vertx.ext.web.handler.sockjs.PermittedOptions;
|
||||
import io.vertx.ext.web.handler.sockjs.SockJSHandler;
|
||||
@ -46,7 +46,7 @@ public class ChatVerticle extends AbstractVerticle {
|
||||
|
||||
ebHandler.bridge(opts, be -> {
|
||||
if (be.type() == BridgeEventType.PUBLISH || be.type() == BridgeEventType.RECEIVE) {
|
||||
if (be.rawMessage().getString("body").equals("armadillos")) {
|
||||
if (be.getRawMessage().getString("body").equals("armadillos")) {
|
||||
// Reject it
|
||||
be.complete(false);
|
||||
return;
|
||||
|
@ -15,7 +15,7 @@ import io.vertx.ext.auth.AuthProvider;
|
||||
import io.vertx.ext.web.Router;
|
||||
import io.vertx.ext.web.Session;
|
||||
import io.vertx.ext.web.handler.*;
|
||||
import io.vertx.ext.web.handler.sockjs.BridgeEventType;
|
||||
import io.vertx.ext.bridge.BridgeEventType;
|
||||
import io.vertx.ext.web.handler.sockjs.BridgeOptions;
|
||||
import io.vertx.ext.web.handler.sockjs.PermittedOptions;
|
||||
import io.vertx.ext.web.handler.sockjs.SockJSHandler;
|
||||
@ -107,27 +107,27 @@ public class PrivateVerticle extends AbstractVerticle {
|
||||
if (be.type() == BridgeEventType.SOCKET_CREATED) {
|
||||
System.out.println("Socket create for session: " + be.socket().webSession().id() + " socketWriteId:" + be.socket().writeHandlerID());
|
||||
} else if (be.type() == BridgeEventType.SOCKET_CLOSED) {
|
||||
System.out.println("Socket closed for: " + be.socket().webSession().id() + " \n " + be.rawMessage());
|
||||
System.out.println("Socket closed for: " + be.socket().webSession().id() + " \n " + be.getRawMessage());
|
||||
// } else if (be.type() == BridgeEventType.SOCKET_IDLE) {
|
||||
// System.out.println("Socket SOCKET_IDLE for: " + be.socket().webSession().id());
|
||||
// } else if (be.type() == BridgeEventType.SOCKET_PING) {
|
||||
// System.out.println("Socket SOCKET_PING for: " + be.socket().webSession().id());
|
||||
} else if (be.type() == BridgeEventType.UNREGISTER) {
|
||||
System.out.println("Socket UNREGISTER for: " + be.socket().webSession().id() + " \n " + be.rawMessage());
|
||||
System.out.println("Socket UNREGISTER for: " + be.socket().webSession().id() + " \n " + be.getRawMessage());
|
||||
} else if (be.type() == BridgeEventType.PUBLISH) {
|
||||
System.out.println("Socket PUBLISH for: " + be.socket().webSession().id() + " \n " + be.rawMessage());
|
||||
System.out.println("Socket PUBLISH for: " + be.socket().webSession().id() + " \n " + be.getRawMessage());
|
||||
} else if (be.type() == BridgeEventType.RECEIVE) {
|
||||
System.out.println("Socket RECEIVE for: " + be.socket().webSession().id() + " \n " + be.rawMessage());
|
||||
System.out.println("Socket RECEIVE for: " + be.socket().webSession().id() + " \n " + be.getRawMessage());
|
||||
} else if (be.type() == BridgeEventType.SEND) {
|
||||
System.out.println("Socket SEND for: " + be.socket().webSession().id() + " \n " + be.rawMessage());
|
||||
System.out.println("Socket SEND for: " + be.socket().webSession().id() + " \n " + be.getRawMessage());
|
||||
} else if (be.type() == BridgeEventType.REGISTER) {
|
||||
System.out.println("Socket REGISTER for: " + be.socket().webSession().id() + " \n " + be.rawMessage());
|
||||
System.out.println("Socket REGISTER for: " + be.socket().webSession().id() + " \n " + be.getRawMessage());
|
||||
//eb.consumer("to-vertx").handler(message -> {
|
||||
// System.out.println("**** response to " + be.socket().webSession().id() + " msg = " + message.body());
|
||||
//});
|
||||
//gw.send(be.rawMessage().toString());
|
||||
} else {
|
||||
System.out.println("Message from: " + be.socket().webSession().id() + " \n " + be.rawMessage());
|
||||
System.out.println("Message from: " + be.socket().webSession().id() + " \n " + be.getRawMessage());
|
||||
}
|
||||
|
||||
// System.out.println("USER=" + be.socket().webUser().principal());
|
||||
|
@ -3,7 +3,7 @@ package org.bigbluebutton.vertx;
|
||||
import io.vertx.core.AbstractVerticle;
|
||||
import io.vertx.ext.web.Router;
|
||||
import io.vertx.ext.web.handler.StaticHandler;
|
||||
import io.vertx.ext.web.handler.sockjs.BridgeEventType;
|
||||
import io.vertx.ext.bridge.BridgeEventType;
|
||||
import io.vertx.ext.web.handler.sockjs.BridgeOptions;
|
||||
import io.vertx.ext.web.handler.sockjs.PermittedOptions;
|
||||
import io.vertx.ext.web.handler.sockjs.SockJSHandler;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.bigbluebutton.vertx;
|
||||
|
||||
import io.vertx.ext.web.handler.sockjs.BridgeEventType;
|
||||
import io.vertx.ext.bridge.BridgeEventType;
|
||||
import io.vertx.ext.web.handler.sockjs.BridgeOptions;
|
||||
import io.vertx.ext.web.handler.sockjs.SockJSHandler;
|
||||
|
||||
@ -14,7 +14,7 @@ public class SockJSHandlerFactory {
|
||||
} else if (be.type() == BridgeEventType.SOCKET_CLOSED) {
|
||||
System.out.println("Socket closed for: " + be.socket().webSession().id());
|
||||
} else {
|
||||
System.out.println("Message from: " + be.socket().webSession().id() + " \n " + be.rawMessage());
|
||||
System.out.println("Message from: " + be.socket().webSession().id() + " \n " + be.getRawMessage());
|
||||
}
|
||||
be.complete(true);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user