Package net.kuujo.vertigo.hook

Examples of net.kuujo.vertigo.hook.EventBusHookListener


        assertTrue(result.succeeded());
        final Cluster cluster = result.result();

        // Use the special EventBusHookListener to listen for messages
        // from the event bus hook. This will handle parsing event bus messages.
        final EventBusHookListener listener = new EventBusHookListener("test-hook", vertx.eventBus());
        listener.startHandler(new Handler<InstanceContext>() {
          @Override
          public void handle(InstanceContext context) {
            assertEquals("sender", context.component().name());
            testComplete();
          }
        });

        // The start() method simply registers an event bus handler for the hook.
        listener.start(new Handler<AsyncResult<Void>>() {
          @Override
          public void handle(AsyncResult<Void> result) {
            assertTrue(result.succeeded());

            NetworkConfig network = vertigo.createNetwork();
View Full Code Here


        assertTrue(result.succeeded());
        final Cluster cluster = result.result();

        // Use the special EventBusHookListener to listen for messages
        // from the event bus hook. This will handle parsing event bus messages.
        final EventBusHookListener listener = new EventBusHookListener("test-hook", vertx.eventBus());
        listener.sendHandler(new Handler<String>() {
          @Override
          public void handle(String message) {
            assertEquals("Hello world!", message);
            testComplete();
          }
        });

        // The start() method simply registers an event bus handler for the hook.
        listener.start(new Handler<AsyncResult<Void>>() {
          @Override
          public void handle(AsyncResult<Void> result) {
            assertTrue(result.succeeded());

            NetworkConfig network = vertigo.createNetwork();
View Full Code Here

        assertTrue(result.succeeded());
        final Cluster cluster = result.result();

        // Use the special EventBusHookListener to listen for messages
        // from the event bus hook. This will handle parsing event bus messages.
        final EventBusHookListener listener = new EventBusHookListener("test-hook", vertx.eventBus());
        listener.receiveHandler(new Handler<String>() {
          @Override
          public void handle(String message) {
            assertEquals("Hello world!", message);
            testComplete();
          }
        });

        // The start() method simply registers an event bus handler for the hook.
        listener.start(new Handler<AsyncResult<Void>>() {
          @Override
          public void handle(AsyncResult<Void> result) {
            assertTrue(result.succeeded());

            NetworkConfig network = vertigo.createNetwork();
View Full Code Here

TOP

Related Classes of net.kuujo.vertigo.hook.EventBusHookListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.