Example usage for io.vertx.core AbstractVerticle subclass-usage

List of usage examples for io.vertx.core AbstractVerticle subclass-usage

Introduction

In this page you can find the example usage for io.vertx.core AbstractVerticle subclass-usage.

Usage

From source file Console.java

public class Console extends AbstractVerticle {

    String username = "galih1994";

    @Override
    public void start(Future<Void> fut) {

From source file HelloServiceVerticle.java

public class HelloServiceVerticle extends AbstractVerticle implements Handler<Message<JsonObject>> {
    @Override
    public void start() {
        vertx.eventBus().consumer("hello-service-vertx", this);
    }

From source file ClientVerticle.java

public class ClientVerticle extends AbstractVerticle implements Handler<AsyncResult<Message<JsonObject>>> {
    @Override
    public void start() {
        JsonObject requestMsg = new JsonObject();
        requestMsg.put("body", "rajith muditha attapattu");
        vertx.eventBus().send("hello-service-amqp", requestMsg, this);

From source file FreeMarker.java

/**
 * This is an example application to showcase the usage of Vert.x Web.
 *
 * In this application you will see the usage of:
 *
 *  * Freemarker templates

From source file PublishToQueueVerticle.java

/**
 * Demonstrates how to use the AmqpService interface for publishing to a queue
 * within a message broker.
 * <p/>
 * This example assumes an ActiveMQ broker (or another AMQP 1.0 broker) is
 * running at localhost:6672

From source file SubVerticle2.java

public class SubVerticle2 extends AbstractVerticle {
    @Override
    public void start() {
        vertx.eventBus().consumer("foo-bar", new Handler<Message<JsonObject>>() {
            @Override
            public void handle(Message<JsonObject> msg) {

From source file PubVerticle.java

public class PubVerticle extends AbstractVerticle {
    @Override
    public void start() {
        JsonObject msg1 = new JsonObject();
        msg1.put("vertx.routing-key", "foo.bar");
        msg1.put("body", "hello world from foo bar");

From source file FortuneCookieClientVerticle.java

/**
 * Demonstrates how a vertx application could use the Service API to communicate
 * with an AMQP Service in a reliable way while respecting it's QoS requirements
 * (flow control in this case).
 *
 * @author <a href="mailto:rajith@rajith.lk">Rajith Muditha Attapattu</a>

From source file SampleVerticle2.java

public class SampleVerticle2 extends AbstractVerticle {

    public void start() {
        LocalMap<String, String> map = vertx.sharedData().getLocalMap("demo.mymap");
        Container<Sample> theContainer = new Container<>("Demo", Container.TYPE.PERSISTENT, Container.MODEL.SHARED);
        String uidName = map.get(ClientVerticle.LEADER);

From source file UncompiledDIVerticle.java

public class UncompiledDIVerticle extends AbstractVerticle {

    private final MyDependency myDependency;

    @Inject
    public UncompiledDIVerticle(MyDependency myDependency) {