Search in sources :

Example 6 with PermittedOptions

use of io.vertx.ext.bridge.PermittedOptions in project vertx-tcp-eventbus-bridge by vert-x3.

the class TcpEventBusBridgeInteropTest method before.

@Before
public void before(TestContext context) {
    vertx = Vertx.vertx();
    final Async async = context.async();
    vertx.eventBus().consumer("hello", (Message<JsonObject> msg) -> msg.reply(new JsonObject().put("value", "Hello " + msg.body().getString("value"))));
    TcpEventBusBridge bridge = TcpEventBusBridge.create(vertx, new BridgeOptions().addInboundPermitted(new PermittedOptions()).addOutboundPermitted(new PermittedOptions()));
    bridge.listen(7000, res -> {
        context.assertTrue(res.succeeded());
        async.complete();
    });
}
Also used : Message(io.vertx.core.eventbus.Message) Async(io.vertx.ext.unit.Async) JsonObject(io.vertx.core.json.JsonObject) BridgeOptions(io.vertx.ext.bridge.BridgeOptions) PermittedOptions(io.vertx.ext.bridge.PermittedOptions) Before(org.junit.Before)

Aggregations

PermittedOptions (io.vertx.ext.bridge.PermittedOptions)6 BridgeOptions (io.vertx.ext.bridge.BridgeOptions)5 Message (io.vertx.core.eventbus.Message)4 JsonObject (io.vertx.core.json.JsonObject)4 Async (io.vertx.ext.unit.Async)3 Before (org.junit.Before)3 TcpEventBusBridge (io.vertx.ext.eventbus.bridge.tcp.TcpEventBusBridge)2 Vertx (io.vertx.core.Vertx)1 EventBus (io.vertx.core.eventbus.EventBus)1 Logger (io.vertx.core.logging.Logger)1 NetServerOptions (io.vertx.core.net.NetServerOptions)1 SSLPeerUnverifiedException (javax.net.ssl.SSLPeerUnverifiedException)1 X509Certificate (javax.security.cert.X509Certificate)1