@Override public void start() throws Exception { // Use Factory method or just with constructor, either is OK someDatabaseService = SomeDatabaseService.create(); // Register your service to the address. new ServiceBinder(vertx.getDelegate()) .setAddress("proxy.address") .register(SomeDatabaseService.class, someDatabaseService); } }
/** * Start transaction service */ private void startTransactionService() { serviceBinder = new ServiceBinder(vertx); TransactionPersistence persistence = TransactionPersistence.create(); // Create an instance of TransactionManagerService and mount to event bus TransactionsManagerService transactionsManagerService = TransactionsManagerService.create(persistence); consumer = serviceBinder .setAddress("transactions_manager.myapp") .register(TransactionsManagerService.class, transactionsManagerService); }
@Override public void start() throws Exception { // Create the client object MyService service = new MyServiceImpl(); // Register the handler new ServiceBinder(vertx) .setAddress("proxy.example") .register(MyService.class, service); Router router = Router.router(vertx); BridgeOptions options = new BridgeOptions().addInboundPermitted(new PermittedOptions().setAddress("proxy.example")); router.route("/eventbus/*").handler(SockJSHandler.create(vertx).bridge(options)); // Serve the static resources router.route().handler(StaticHandler.create()); vertx.createHttpServer().requestHandler(router).listen(8080); } }
@Override public void start() throws Exception { // Create the client object ProcessorService service = new ProcessorServiceImpl(); // Register the handler new ServiceBinder(vertx) .setAddress("vertx.processor") .register(ProcessorService.class, service); Router router = Router.router(vertx); // Allow events for the designated addresses in/out of the event bus bridge BridgeOptions opts = new BridgeOptions() .addInboundPermitted(new PermittedOptions().setAddress("vertx.processor")) .addOutboundPermitted(new PermittedOptions().setAddress("vertx.processor")); // Create the event bus bridge and add it to the router. SockJSHandler ebHandler = SockJSHandler.create(vertx).bridge(opts); router.route("/eventbus/*").handler(ebHandler); router.route().handler(StaticHandler.create()); // vertx.createHttpServer().requestHandler(router).listen(8080); }
@Override public void start() throws Exception { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); //register the service proxy on event bus serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(address) .register(RepositoryConnectorProxy.class, new FilesystemRepositoryConnectorProxyImpl(vertx, config())); }
@Override public void start() throws Exception { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); //register the service proxy on event bus serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(configuration.getAddress()) .register(KnotProxy.class, new GatewayKnotProxyImpl()); }
@Override public void start() { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); //register the service proxy on event bus serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(configuration.getAddress()) .register(RepositoryConnectorProxy.class, new FilesystemRepositoryConnectorProxyImpl(vertx, configuration)); }
@Override public void start() { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); //register the service proxy on event bus serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(configuration.getAddress()) .register(RepositoryConnectorProxy.class, new HttpRepositoryConnectorProxyImpl(vertx, configuration)); }
@Override public void start() throws Exception { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(configuration.getAddress()) .register(KnotProxy.class, new RequestProcessorKnotProxyImpl()); }
@Override public void start() throws Exception { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); //register the service proxy on event bus serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(configuration.getAddress()) .register(DataSourceAdapterProxy.class, new HttpDataSourceAdapterProxy(vertx, configuration)); }
@Override public void start() { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); //register the service proxy on event bus serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(options.getAddress()) .register(KnotProxy.class, new DataBridgeKnotProxy(vertx, options)); }
@Override public void start() { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); //register the service proxy on event bus serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(options.getAddress()) .register(KnotProxy.class, new FragmentAssemblerKnotProxyImpl(options)); }
@Override public void start() { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); //register the service proxy on event bus serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(options.getAddress()) .register(KnotProxy.class, new FragmentAssemblerKnotProxyImpl(options)); }
@Override public void start() throws Exception { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); //register the service proxy on event bus serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(configuration.getAddress()) .register(KnotProxy.class, new GatewayKnotProxyImpl()); }
@Override public void start() { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); //register the service proxy on event bus serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(configuration.getAddress()) .register(RepositoryConnectorProxy.class, new HttpRepositoryConnectorProxyImpl(vertx, configuration)); }
@Override public void start() throws Exception { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(configuration.getAddress()) .register(KnotProxy.class, new ResponseProviderKnotProxyImpl()); }
@Override public void start() throws Exception { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); //register the service proxy on event bus serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(configuration.getAddress()) .register(KnotProxy.class, new GatewayKnotProxyImpl()); }
@Override public void start() throws Exception { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); //register the service proxy on event bus serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(configuration.getAddress()) .register(AdapterProxy.class, new HttpActionAdapterProxyImpl(vertx, configuration)); }
@Override public void start() throws Exception { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); //register the service proxy on event bus serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(configuration.getAddress()) .register(FormsAdapterProxy.class, new FormsAdapterProxyImpl(vertx, configuration)); }
@Override public void start() throws Exception { LOGGER.info("Starting <{}>", this.getClass().getSimpleName()); //register the service proxy on event bus serviceBinder = new ServiceBinder(getVertx()); consumer = serviceBinder .setAddress(configuration.address()) .register(KnotProxy.class, new FragmentAssemblerKnotProxyImpl(config())); }