@Override public void start(StartContext context) throws StartException { this.vertx = this.platformManagerInjector.getValue().vertx(); }
@Override public void start() throws Exception { if (this.isStarted) { return; } System.setProperty("vertx.clusterManagerFactory", HazelcastClusterManagerFactory.class.getName()); if (quorumSize != -1) { platformManager = PlatformLocator.factory.createPlatformManager(port, host, quorumSize, haGroup); } else { platformManager = PlatformLocator.factory.createPlatformManager(port, host); } eventBus = platformManager.vertx().eventBus(); if (this.connectorName == null || this.connectorName.trim().equals("")) { throw new Exception("invalid connector name: " + this.connectorName); } if (this.queueName == null || this.queueName.trim().equals("")) { throw new Exception("invalid queue name: " + queueName); } SimpleString name = new SimpleString(this.queueName); Binding b = this.postOffice.getBinding(name); if (b == null) { throw new Exception(connectorName + ": queue " + queueName + " not found"); } this.queue = (Queue) b.getBindable(); this.queue.addConsumer(this); this.queue.deliverAsync(); this.isStarted = true; ActiveMQVertxLogger.LOGGER.debug(connectorName + ": started"); }
@Override public void start() throws Exception { if (this.isStarted) { return; } System.setProperty("vertx.clusterManagerFactory", HazelcastClusterManagerFactory.class.getName()); if (quorumSize != -1) { platformManager = PlatformLocator.factory.createPlatformManager(port, host, quorumSize, haGroup); } else { platformManager = PlatformLocator.factory.createPlatformManager(port, host); } eventBus = platformManager.vertx().eventBus(); Binding b = postOffice.getBinding(new SimpleString(queueName)); if (b == null) { throw new Exception(connectorName + ": queue " + queueName + " not found"); } handler = new EventHandler(); eventBus.registerHandler(vertxAddress, handler); isStarted = true; ActiveMQVertxLogger.LOGGER.debug(connectorName + ": started"); }
EventBus eb = mgr.vertx().eventBus(); eb.registerHandler(TESTRUNNER_HANDLER_ADDRESS, handler); final CountDownLatch deployLatch = new CountDownLatch(1);