/** * Binds the specified annotated service object under the path prefix {@code "/"}. */ public B annotatedService(Object service) { return annotatedService("/", service, Function.identity(), ImmutableList.of()); }
/** * Binds the specified annotated service object under the specified path prefix. * * @param exceptionHandlersAndConverters an iterable object of {@link ExceptionHandlerFunction}, * {@link RequestConverterFunction} and/or * {@link ResponseConverterFunction} */ public B annotatedService(String pathPrefix, Object service, Iterable<?> exceptionHandlersAndConverters) { return annotatedService(pathPrefix, service, Function.identity(), requireNonNull(exceptionHandlersAndConverters, "exceptionHandlersAndConverters")); }
/** * Binds the specified annotated service object under the specified path prefix. */ public B annotatedService(String pathPrefix, Object service) { return annotatedService(pathPrefix, service, Function.identity(), ImmutableList.of()); }
/** * Binds the specified annotated service object under the specified path prefix. * * @param exceptionHandlersAndConverters instances of {@link ExceptionHandlerFunction}, * {@link RequestConverterFunction} and/or * {@link ResponseConverterFunction} */ public B annotatedService(String pathPrefix, Object service, Object... exceptionHandlersAndConverters) { return annotatedService(pathPrefix, service, Function.identity(), ImmutableList.copyOf(requireNonNull(exceptionHandlersAndConverters, "exceptionHandlersAndConverters"))); }
/** * Binds the specified annotated service object under the path prefix {@code "/"}. * * @param exceptionHandlersAndConverters instances of {@link ExceptionHandlerFunction}, * {@link RequestConverterFunction} and/or * {@link ResponseConverterFunction} */ public B annotatedService(Object service, Object... exceptionHandlersAndConverters) { return annotatedService("/", service, Function.identity(), ImmutableList.copyOf(requireNonNull(exceptionHandlersAndConverters, "exceptionHandlersAndConverters"))); }
/** * Binds the specified annotated service object under the path prefix {@code "/"}. * * @param exceptionHandlersAndConverters instances of {@link ExceptionHandlerFunction}, * {@link RequestConverterFunction} and/or * {@link ResponseConverterFunction} */ public B annotatedService(Object service, Function<Service<HttpRequest, HttpResponse>, ? extends Service<HttpRequest, HttpResponse>> decorator, Object... exceptionHandlersAndConverters) { return annotatedService("/", service, decorator, ImmutableList.copyOf(requireNonNull(exceptionHandlersAndConverters, "exceptionHandlersAndConverters"))); }
/** * Binds the specified annotated service object under the specified path prefix. * * @param exceptionHandlersAndConverters instances of {@link ExceptionHandlerFunction}, * {@link RequestConverterFunction} and/or * {@link ResponseConverterFunction} */ public B annotatedService(String pathPrefix, Object service, Function<Service<HttpRequest, HttpResponse>, ? extends Service<HttpRequest, HttpResponse>> decorator, Object... exceptionHandlersAndConverters) { return annotatedService(pathPrefix, service, decorator, ImmutableList.copyOf(requireNonNull(exceptionHandlersAndConverters, "exceptionHandlersAndConverters"))); }