io.vertx.serviceproxy.ServiceExceptionMessageCodec Java Examples

The following examples show how to use io.vertx.serviceproxy.ServiceExceptionMessageCodec. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProductServiceVertxProxyHandler.java    From vertx-blueprint-microservice with Apache License 2.0 6 votes vote down vote up
public ProductServiceVertxProxyHandler(Vertx vertx, ProductService service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #2
Source File: HelloServiceVertxProxyHandler.java    From vertx-rx with Apache License 2.0 6 votes vote down vote up
public HelloServiceVertxProxyHandler(Vertx vertx, HelloService service, boolean topLevel, long timeoutSeconds, boolean includeDebugInfo) {
  this.vertx = vertx;
  this.service = service;
  this.includeDebugInfo = includeDebugInfo;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #3
Source File: HelloServiceVertxProxyHandler.java    From vertx-rx with Apache License 2.0 6 votes vote down vote up
public HelloServiceVertxProxyHandler(Vertx vertx, HelloService service, boolean topLevel, long timeoutSeconds, boolean includeDebugInfo) {
  this.vertx = vertx;
  this.service = service;
  this.includeDebugInfo = includeDebugInfo;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #4
Source File: PortfolioServiceVertxProxyHandler.java    From vertx-microservices-workshop with Apache License 2.0 6 votes vote down vote up
public PortfolioServiceVertxProxyHandler(Vertx vertx, PortfolioService service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #5
Source File: PortfolioServiceVertxProxyHandler.java    From vertx-microservices-workshop with Apache License 2.0 6 votes vote down vote up
public PortfolioServiceVertxProxyHandler(Vertx vertx, PortfolioService service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #6
Source File: QueryableVertxProxyHandler.java    From vertx-graphql-service-discovery with Apache License 2.0 6 votes vote down vote up
public QueryableVertxProxyHandler(Vertx vertx, Queryable service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #7
Source File: EchoServiceVertxProxyHandler.java    From weld-vertx with Apache License 2.0 6 votes vote down vote up
public EchoServiceVertxProxyHandler(Vertx vertx, EchoService service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #8
Source File: AccountServiceVertxProxyHandler.java    From vertx-blueprint-microservice with Apache License 2.0 6 votes vote down vote up
public AccountServiceVertxProxyHandler(Vertx vertx, AccountService service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #9
Source File: StoreCRUDServiceVertxProxyHandler.java    From vertx-blueprint-microservice with Apache License 2.0 6 votes vote down vote up
public StoreCRUDServiceVertxProxyHandler(Vertx vertx, StoreCRUDService service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #10
Source File: OrderServiceVertxProxyHandler.java    From vertx-blueprint-microservice with Apache License 2.0 6 votes vote down vote up
public OrderServiceVertxProxyHandler(Vertx vertx, OrderService service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #11
Source File: CounterServiceVertxProxyHandler.java    From vertx-blueprint-microservice with Apache License 2.0 6 votes vote down vote up
public CounterServiceVertxProxyHandler(Vertx vertx, CounterService service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #12
Source File: PaymentQueryServiceVertxProxyHandler.java    From vertx-blueprint-microservice with Apache License 2.0 6 votes vote down vote up
public PaymentQueryServiceVertxProxyHandler(Vertx vertx, PaymentQueryService service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #13
Source File: SensorDataServiceVertxProxyHandler.java    From vertx-in-action with MIT License 6 votes vote down vote up
public SensorDataServiceVertxProxyHandler(Vertx vertx, SensorDataService service, boolean topLevel, long timeoutSeconds, boolean includeDebugInfo) {
  this.vertx = vertx;
  this.service = service;
  this.includeDebugInfo = includeDebugInfo;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #14
Source File: CheckoutServiceVertxProxyHandler.java    From vertx-blueprint-microservice with Apache License 2.0 6 votes vote down vote up
public CheckoutServiceVertxProxyHandler(Vertx vertx, CheckoutService service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #15
Source File: PortfolioServiceVertxProxyHandler.java    From vertx-kubernetes-workshop with Apache License 2.0 6 votes vote down vote up
public PortfolioServiceVertxProxyHandler(Vertx vertx, PortfolioService service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #16
Source File: ShoppingCartServiceVertxProxyHandler.java    From vertx-blueprint-microservice with Apache License 2.0 6 votes vote down vote up
public ShoppingCartServiceVertxProxyHandler(Vertx vertx, ShoppingCartService service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #17
Source File: PortfolioServiceVertxProxyHandler.java    From microtrader with MIT License 6 votes vote down vote up
public PortfolioServiceVertxProxyHandler(Vertx vertx, PortfolioService service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #18
Source File: JobServiceVertxProxyHandler.java    From vertx-kue with Apache License 2.0 6 votes vote down vote up
public JobServiceVertxProxyHandler(Vertx vertx, JobService service, boolean topLevel, long timeoutSeconds) {
  this.vertx = vertx;
  this.service = service;
  this.timeoutSeconds = timeoutSeconds;
  try {
    this.vertx.eventBus().registerDefaultCodec(ServiceException.class,
      new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {
  }
  if (timeoutSeconds != -1 && !topLevel) {
    long period = timeoutSeconds * 1000 / 2;
    if (period > 10000) {
      period = 10000;
    }
    this.timerID = vertx.setPeriodic(period, this::checkTimedOut);
  } else {
    this.timerID = -1;
  }
  accessed();
}
 
Example #19
Source File: EchoServiceVertxEBProxy.java    From weld-vertx with Apache License 2.0 5 votes vote down vote up
public EchoServiceVertxEBProxy(Vertx vertx, String address, DeliveryOptions options) {
  this._vertx = vertx;
  this._address = address;
  this._options = options;
  try {
    this._vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
}
 
Example #20
Source File: HelloServiceVertxEBProxy.java    From vertx-rx with Apache License 2.0 5 votes vote down vote up
public HelloServiceVertxEBProxy(Vertx vertx, String address, DeliveryOptions options) {
  this._vertx = vertx;
  this._address = address;
  this._options = options;
  try {
    this._vertx.eventBus().registerDefaultCodec(ServiceException.class, new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {
  }
}
 
Example #21
Source File: HelloServiceVertxEBProxy.java    From vertx-rx with Apache License 2.0 5 votes vote down vote up
public HelloServiceVertxEBProxy(Vertx vertx, String address, DeliveryOptions options) {
  this._vertx = vertx;
  this._address = address;
  this._options = options;
  try {
    this._vertx.eventBus().registerDefaultCodec(ServiceException.class, new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {
  }
}
 
Example #22
Source File: PortfolioServiceVertxEBProxy.java    From vertx-microservices-workshop with Apache License 2.0 5 votes vote down vote up
public PortfolioServiceVertxEBProxy(Vertx vertx, String address, DeliveryOptions options) {
  this._vertx = vertx;
  this._address = address;
  this._options = options;
  try {
    this._vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
}
 
Example #23
Source File: PortfolioServiceVertxEBProxy.java    From vertx-kubernetes-workshop with Apache License 2.0 5 votes vote down vote up
public PortfolioServiceVertxEBProxy(Vertx vertx, String address, DeliveryOptions options) {
  this._vertx = vertx;
  this._address = address;
  this._options = options;
  try {
    this._vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
}
 
Example #24
Source File: PortfolioServiceVertxEBProxy.java    From vertx-microservices-workshop with Apache License 2.0 5 votes vote down vote up
public PortfolioServiceVertxEBProxy(Vertx vertx, String address, DeliveryOptions options) {
  this._vertx = vertx;
  this._address = address;
  this._options = options;
  try {
    this._vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
}
 
Example #25
Source File: QueryableVertxEBProxy.java    From vertx-graphql-service-discovery with Apache License 2.0 5 votes vote down vote up
public QueryableVertxEBProxy(Vertx vertx, String address, DeliveryOptions options) {
  this._vertx = vertx;
  this._address = address;
  this._options = options;
  try {
    this._vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
}
 
Example #26
Source File: PortfolioServiceVertxEBProxy.java    From microtrader with MIT License 5 votes vote down vote up
public PortfolioServiceVertxEBProxy(Vertx vertx, String address, DeliveryOptions options) {
  this._vertx = vertx;
  this._address = address;
  this._options = options;
  try {
    this._vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
}
 
Example #27
Source File: CheckoutServiceVertxEBProxy.java    From vertx-blueprint-microservice with Apache License 2.0 5 votes vote down vote up
public CheckoutServiceVertxEBProxy(Vertx vertx, String address, DeliveryOptions options) {
  this._vertx = vertx;
  this._address = address;
  this._options = options;
  try {
    this._vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
}
 
Example #28
Source File: JobServiceVertxEBProxy.java    From vertx-kue with Apache License 2.0 5 votes vote down vote up
public JobServiceVertxEBProxy(Vertx vertx, String address, DeliveryOptions options) {
  this._vertx = vertx;
  this._address = address;
  this._options = options;
  try {
    this._vertx.eventBus().registerDefaultCodec(ServiceException.class,
      new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {
  }
}
 
Example #29
Source File: AccountServiceVertxEBProxy.java    From vertx-blueprint-microservice with Apache License 2.0 5 votes vote down vote up
public AccountServiceVertxEBProxy(Vertx vertx, String address, DeliveryOptions options) {
  this._vertx = vertx;
  this._address = address;
  this._options = options;
  try {
    this._vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
}
 
Example #30
Source File: StoreCRUDServiceVertxEBProxy.java    From vertx-blueprint-microservice with Apache License 2.0 5 votes vote down vote up
public StoreCRUDServiceVertxEBProxy(Vertx vertx, String address, DeliveryOptions options) {
  this._vertx = vertx;
  this._address = address;
  this._options = options;
  try {
    this._vertx.eventBus().registerDefaultCodec(ServiceException.class,
        new ServiceExceptionMessageCodec());
  } catch (IllegalStateException ex) {}
}