Package io.vertx.core.eventbus

Examples of io.vertx.core.eventbus.DeliveryOptions


  }

  @Override
  public CompletableFuture<PingResponse> ping(final PingRequest request) {
    final CompletableFuture<PingResponse> future = new CompletableFuture<>();
    DeliveryOptions options = new DeliveryOptions().setSendTimeout(5000);
    vertx.eventBus().send(address, writer.writeRequest(request), options, new Handler<AsyncResult<Message<byte[]>>>() {
      @Override
      public void handle(AsyncResult<Message<byte[]>> result) {
        if (result.failed()) {
          future.completeExceptionally(result.cause());
View Full Code Here


  }

  @Override
  public CompletableFuture<SyncResponse> sync(final SyncRequest request) {
    final CompletableFuture<SyncResponse> future = new CompletableFuture<>();
    DeliveryOptions options = new DeliveryOptions().setSendTimeout(5000);
    vertx.eventBus().send(address, writer.writeRequest(request), options, new Handler<AsyncResult<Message<byte[]>>>() {
      @Override
      public void handle(AsyncResult<Message<byte[]>> result) {
        if (result.failed()) {
          future.completeExceptionally(result.cause());
View Full Code Here

  }

  @Override
  public CompletableFuture<PollResponse> poll(final PollRequest request) {
    final CompletableFuture<PollResponse> future = new CompletableFuture<>();
    DeliveryOptions options = new DeliveryOptions().setSendTimeout(5000);
    vertx.eventBus().send(address, writer.writeRequest(request), options, new Handler<AsyncResult<Message<byte[]>>>() {
      @Override
      public void handle(AsyncResult<Message<byte[]>> result) {
        if (result.failed()) {
          future.completeExceptionally(result.cause());
View Full Code Here

  }

  @Override
  public CompletableFuture<SubmitResponse> submit(final SubmitRequest request) {
    final CompletableFuture<SubmitResponse> future = new CompletableFuture<>();
    DeliveryOptions options = new DeliveryOptions().setSendTimeout(5000);
    vertx.eventBus().send(address, writer.writeRequest(request), options, new Handler<AsyncResult<Message<byte[]>>>() {
      @Override
      public void handle(AsyncResult<Message<byte[]>> result) {
        if (result.failed()) {
          future.completeExceptionally(result.cause());
View Full Code Here

    startNodes(2);
    MessageCodec codec = new MyPOJOEncoder1();
    vertices[0].eventBus().registerCodec(codec);
    vertices[1].eventBus().registerCodec(codec);
    String str = TestUtils.randomAlphaString(100);
    testSend(new MyPOJO(str), str, null, new DeliveryOptions().setCodecName(codec.name()));
  }
View Full Code Here

    startNodes(2);
    MessageCodec codec = new MyPOJOEncoder1();
    vertices[0].eventBus().registerCodec(codec);
    vertices[1].eventBus().registerCodec(codec);
    String str = TestUtils.randomAlphaString(100);
    testReply(new MyPOJO(str), str, null, new DeliveryOptions().setCodecName(codec.name()));
  }
View Full Code Here

    MessageCodec codec = new MyPOJOEncoder2();
    vertices[0].eventBus().registerCodec(codec);
    vertices[1].eventBus().registerCodec(codec);
    String str = TestUtils.randomAlphaString(100);
    MyPOJO pojo = new MyPOJO(str);
    testSend(pojo, pojo, null, new DeliveryOptions().setCodecName(codec.name()));
  }
View Full Code Here

    MessageCodec codec = new MyPOJOEncoder2();
    vertices[0].eventBus().registerCodec(codec);
    vertices[1].eventBus().registerCodec(codec);
    String str = TestUtils.randomAlphaString(100);
    MyPOJO pojo = new MyPOJO(str);
    testReply(pojo, pojo, null, new DeliveryOptions().setCodecName(codec.name()));
  }
View Full Code Here

              new ReplyException(ReplyFailure.RECIPIENT_FAILURE, failureCode, message), null), null, null);
  }

  @Override
  public void reply(Object message) {
    reply(message, new DeliveryOptions(), null);
  }
View Full Code Here

    reply(message, new DeliveryOptions(), null);
  }

  @Override
  public <R> void reply(Object message, Handler<AsyncResult<Message<R>>> replyHandler) {
    reply(message, new DeliveryOptions(), replyHandler);
  }
View Full Code Here

TOP

Related Classes of io.vertx.core.eventbus.DeliveryOptions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.