Codota Logo
WeldVerticle
Code IndexAdd Codota to your IDE (free)

How to use
WeldVerticle
in
org.jboss.weld.vertx

Best Java code snippets using org.jboss.weld.vertx.WeldVerticle (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: org.jboss.weld.vertx/weld-vertx-core

@Override
public void start(Future<Void> startFuture) throws Exception {
  Weld weld = this.weld != null ? this.weld : createDefaultWeld();
  if (weld.getContainerId() == null) {
    weld.containerId(deploymentID());
  }
  weld.addExtension(new VertxExtension(vertx, context));
  configureWeld(weld);
  // Bootstrap can take some time to complete
  vertx.executeBlocking(future -> {
    try {
      this.weldContainer = weld.initialize();
      future.complete();
    } catch (Exception e) {
      future.fail(e);
    }
  }, result -> {
    if (result.succeeded()) {
      LOGGER.info("Weld verticle started for deployment {0}", deploymentID());
      startFuture.complete();
    } else {
      startFuture.fail(result.cause());
    }
  });
}
origin: org.jboss.weld.vertx/weld-vertx-core

checkContainer();
return weldContainer;
origin: weld/weld-vertx

@Before
public void init(TestContext context) {
  vertx = Vertx.vertx();
  WeldVerticle weldVerticle = new WeldVerticle(createDefaultWeld().disableDiscovery().beanClasses(CoolHelloService.class));
  Async async = context.async();
  vertx.deployVerticle(weldVerticle, r -> {
    if (r.succeeded()) {
      weld = weldVerticle.container();
      async.complete();
    } else {
      context.fail(r.cause());
    }
  });
}
origin: weld/weld-vertx

@Before
public void init(TestContext context) throws InterruptedException {
  final WeldVerticle weldVerticle = new WeldVerticle();
  Async async = context.async();
  vertx = Vertx.vertx();
  vertx.deployVerticle(weldVerticle, r -> {
    if (r.succeeded()) {
      weld = weldVerticle.container();
      async.complete();
    } else {
      context.fail(r.cause());
    }
  });
}
origin: weld/weld-vertx

@Before
public void init(TestContext context) {
  vertx = Vertx.vertx();
  Async async = context.async();
  vertx.deployVerticle(new WeldVerticle(), r -> {
    if (r.succeeded()) {
      async.complete();
    } else {
      context.fail(r.cause());
    }
  });
  // We don't expect the tests to run in parallel
  VertxObservers.SYNCHRONIZER.clear();
}
origin: weld/weld-vertx

@Before
public void init(TestContext context) throws InterruptedException {
  final WeldVerticle weldVerticle = new WeldVerticle();
  Async async = context.async();
  vertx = Vertx.vertx();
  vertx.deployVerticle(weldVerticle, r -> {
    if (r.succeeded()) {
      weld = weldVerticle.container();
      async.complete();
    } else {
      context.fail(r.cause());
    }
  });
}
origin: weld/weld-vertx

@Override
public void start(Future<Void> startFuture) throws Exception {
  Weld weld = this.weld != null ? this.weld : createDefaultWeld();
  if (weld.getContainerId() == null) {
    weld.containerId(deploymentID());
  }
  weld.addExtension(new VertxExtension(vertx, context));
  configureWeld(weld);
  // Bootstrap can take some time to complete
  vertx.executeBlocking(future -> {
    try {
      this.weldContainer = weld.initialize();
      future.complete();
    } catch (Exception e) {
      future.fail(e);
    }
  }, result -> {
    if (result.succeeded()) {
      LOGGER.info("Weld verticle started for deployment {0}", deploymentID());
      startFuture.complete();
    } else {
      startFuture.fail(result.cause());
    }
  });
}
origin: weld/weld-vertx

@Before
public void init(TestContext context) throws InterruptedException {
  final WeldVerticle weldVerticle = new WeldVerticle();
  Async async = context.async();
  vertx = Vertx.vertx();
  vertx.deployVerticle(weldVerticle, deployResult -> {
    if (deployResult.succeeded()) {
      // Deploy Verticle instance produced by Weld
      vertx.deployVerticle(weldVerticle.container().select(BeanVerticle.class).get(), (beanVerticleDeployResult) -> {
        if (beanVerticleDeployResult.succeeded()) {
          async.complete();
        }
      });
    }
  });
}
origin: weld/weld-vertx

checkContainer();
return weldContainer;
org.jboss.weld.vertxWeldVerticle

Javadoc

This Verticle starts/stops the Weld SE container and registers VertxExtension automatically.

Most used methods

  • createDefaultWeld
  • <init>
  • checkContainer
  • configureWeld
    Subclass may override this method to customize the Weld SE container.
  • container
    Provides convenient access to beans, BeanManager and events. E.g. allows to deploy Verticle instance
  • deploymentID

Popular in Java

  • Running tasks concurrently on multiple threads
  • compareTo (BigDecimal)
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now