Sha256: df6e1f987d0e63f2483da4941e3a965182311cb6c73b07071cbaaabbad536ee3

Contents?: true

Size: 1017 Bytes

Versions: 8

Compression:

Stored size: 1017 Bytes

Contents

package org.jruby.jubilee.vertx;

import org.vertx.java.core.Vertx;
import org.vertx.java.core.VertxFactory;
import org.vertx.java.core.eventbus.EventBus;
import org.vertx.java.core.shareddata.SharedData;

/**
 * Created with IntelliJ IDEA.
 * User: isaiah
 * Date: 20/09/2013
 * Time: 15:24
 */
public class JubileeVertx {
    public static Vertx vertx;
    private JubileeVertx() {
    }
    public static synchronized Vertx init(int port, String host) {
        if (vertx != null) return vertx;
        vertx = VertxFactory.newVertx(port, host);
        return vertx;
    }
    public static synchronized Vertx init(String host) {
        if (vertx != null) return vertx;
        vertx = VertxFactory.newVertx(host);
        return vertx;
    }
    public static synchronized Vertx init() {
        if (vertx != null) return vertx;
        vertx = VertxFactory.newVertx();
        return vertx;
    }

    public synchronized static Vertx vertx() {
        if (vertx == null) init();
        return vertx;
    }
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
jubilee-1.1.0-java java/src/org/jruby/jubilee/vertx/JubileeVertx.java
jubilee-1.1.0.rc3 java/src/org/jruby/jubilee/vertx/JubileeVertx.java
jubilee-1.1.0.rc2 java/src/org/jruby/jubilee/vertx/JubileeVertx.java
jubilee-1.1.0.rc1 java/src/org/jruby/jubilee/vertx/JubileeVertx.java
jubilee-1.0.2 java/src/org/jruby/jubilee/vertx/JubileeVertx.java
jubilee-1.0.1 java/src/org/jruby/jubilee/vertx/JubileeVertx.java
jubilee-1.0.0 java/src/org/jruby/jubilee/vertx/JubileeVertx.java
jubilee-1.0.0.beta1 java/src/org/jruby/jubilee/vertx/JubileeVertx.java