Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. public static void main(String[] args) {
  2. Vertx vertx = Vertx.vertx();
  3. vertx.deployVerticle(MyVerticle.class.getName());
  4. }
  5.  
  6. public static void main(String[] args) {
  7. Vertx vertx = Vertx.vertx();
  8. vertx.deployVerticle(new MyVerticle());
  9. }
  10.  
  11. BlockingQueue<AsyncResult<String>> q = new ArrayBlockingQueue<>(1);
  12. Vertx.vertx().deployVerticle(new Application(), q::offer);
  13. AsyncResult<String> result = q.take();
  14. if (result.failed()) {
  15. throw new RuntimeException(result.cause());
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement