public Fabric8MQ() { vertx = VertxFactory.newVertx(); servers = new CopyOnWriteArrayList<>(); multiplexerControllers = new CopyOnWriteArrayList<>(); socketsConnecting = new HashSet<>(); socketsConnected = new HashSet<>(); protocolDetectors = new CopyOnWriteArrayList<>(); shutdownTacker = new ShutdownTracker(); }
/** * Create a clustered Vertx instance listening for cluster connections on the default port 25500 * @param hostname The hostname or ip address to listen for cluster connections */ public static Vertx newVertx(String hostname) { return loadFactory().createVertx(hostname); }
public Fabric8MQ() { vertx = VertxFactory.newVertx(); servers = new CopyOnWriteArrayList<>(); multiplexerControllers = new CopyOnWriteArrayList<>(); socketsConnecting = new HashSet<>(); socketsConnected = new HashSet<>(); protocolDetectors = new CopyOnWriteArrayList<>(); shutdownTacker = new ShutdownTracker(); }
/** * Create a clustered Vertx instance * @param port The port to listen for cluster connections * @param hostname The hostname or ip address to listen for cluster connections */ public static Vertx newVertx(int port, String hostname) { return loadFactory().createVertx(port, hostname); }
public static DataStoreClient getVertxWebSocketClient(String contextName, DataStoreClientConfig dssc, boolean verbose) { /* Create a new instance of Vertx. */ Vertx vertx = VertxFactory.newVertx(); /* CONFIG: Initialize the client provider. */ DataStoreVertxWebSocketClientProvider provider = new DataStoreVertxWebSocketClientProvider(); provider.registerSupplier(); //register the provider. println(dssc); provider.init(vertx, new DataOutputQueueTransferQueue(10), dssc, verbose, false); DataStoreClient client = DataStoreFactory.createClient(contextName, null); Sys.sleep(1000); return client; }
/** * Create a non clustered Vertx instance */ public static Vertx newVertx() { return loadFactory().createVertx(); }
/** * Constructor. * * @param httpPort The HTTP port on which the emulator should run. */ public EmulatorLaunchpad(int httpPort) { vertx = VertxFactory.newVertx(); // Static files HttpServer httpServer = vertx.createHttpServer(); httpServer.requestHandler(new WebResourceHandler()); // Eventbus bridge JsonObject bridgeConfig = new JsonObject().putString("prefix", EVENTBUS_ADDRESS); JsonArray credentialsPermitAll = new JsonArray().add(new JsonObject()); vertx.createSockJSServer(httpServer).bridge(bridgeConfig, credentialsPermitAll, credentialsPermitAll); vertx.eventBus().registerLocalHandler(EVENTBUS_SERVER_HANDLER_ID, eventBusHandler); System.out.println("Launchpad emulator is ready on http://localhost:" + httpPort + "/"); httpServer.listen(httpPort); }
protected EtcdClient(Vertx vertx, ClientBuilder builder) { this.vertx = vertx==null ? VertxFactory.newVertx() : vertx; this.sslAuthRequired = builder.sslAuthRequired(); this.sslTrustAll = builder.sslTrustAll(); this.sslKeyStorePassword = builder.sslKeyStorePassword(); this.sslTrustStorePassword = builder.sslTrustStorePassword(); this.sslKeyStorePath = builder.sslKeyStorePath(); this.sslTrustStorePath = builder.sslTrustStorePath(); this.timeOutInMilliseconds = builder.timeOutInMilliseconds(); this.useSSL = builder.useSSL(); this.poolSize = builder.poolSize(); this.hosts = Arry.array(builder.hosts()); this.sslContext = builder.sslContext(); this.followLeader = builder.followLeader(); connect(); }
protected EtcdClient(Vertx vertx, ClientBuilder builder) { this.vertx = vertx==null ? VertxFactory.newVertx() : vertx; this.sslAuthRequired = builder.sslAuthRequired(); this.sslTrustAll = builder.sslTrustAll(); this.sslKeyStorePassword = builder.sslKeyStorePassword(); this.sslTrustStorePassword = builder.sslTrustStorePassword(); this.sslKeyStorePath = builder.sslKeyStorePath(); this.sslTrustStorePath = builder.sslTrustStorePath(); this.timeOutInMilliseconds = builder.timeOutInMilliseconds(); this.useSSL = builder.useSSL(); this.poolSize = builder.poolSize(); this.hosts = Arry.array(builder.hosts()); this.sslContext = builder.sslContext(); this.followLeader = builder.followLeader(); connect(); }
protected EtcdClient(Vertx vertx, ClientBuilder builder) { this.vertx = vertx==null ? VertxFactory.newVertx() : vertx; this.sslAuthRequired = builder.sslAuthRequired(); this.sslTrustAll = builder.sslTrustAll(); this.sslKeyStorePassword = builder.sslKeyStorePassword(); this.sslTrustStorePassword = builder.sslTrustStorePassword(); this.sslKeyStorePath = builder.sslKeyStorePath(); this.sslTrustStorePath = builder.sslTrustStorePath(); this.timeOutInMilliseconds = builder.timeOutInMilliseconds(); this.useSSL = builder.useSSL(); this.poolSize = builder.poolSize(); this.hosts = Arry.array(builder.hosts()); this.sslContext = builder.sslContext(); this.followLeader = builder.followLeader(); connect(); }