SentinelInvocationHandler(Target<?> target, Map<Method, MethodHandler> dispatch) { this.target = checkNotNull(target, "target"); this.dispatch = checkNotNull(dispatch, "dispatch"); }
SentinelInvocationHandler(Target<?> target, Map<Method, MethodHandler> dispatch, FallbackFactory fallbackFactory) { this.target = checkNotNull(target, "target"); this.dispatch = checkNotNull(dispatch, "dispatch"); this.fallbackFactory = fallbackFactory; this.fallbackMethodMap = toFallbackMethod(dispatch); }
public DecoratorInvocationHandler(Target<?> target, Map<Method, MethodHandler> dispatch, FeignDecorator invocationDecorator) { this.target = checkNotNull(target, "target"); checkNotNull(dispatch, "dispatch"); this.decoratedDispatch = decorateMethodHandlers(dispatch, invocationDecorator, target); }
/** * @param message possibly null reason for the failure. * @param cause the cause of the error. */ public DecodeException(String message, Throwable cause) { super(message, checkNotNull(cause, "cause")); } }
Request(String method, String url, Map<String, Collection<String>> headers, byte[] body, Charset charset) { this.method = checkNotNull(method, "method of %s", url); this.url = checkNotNull(url, "url"); this.headers = checkNotNull(headers, "headers of %s %s", method, url); this.body = body; // nullable this.charset = charset; // nullable }
/** * @param message the reason for the failure. */ public DecodeException(String message) { super(checkNotNull(message, "message")); }
Factory(Client client, Retryer retryer, List<RequestInterceptor> requestInterceptors, Logger logger, Logger.Level logLevel, boolean decode404) { this.client = checkNotNull(client, "client"); this.retryer = checkNotNull(retryer, "retryer"); this.requestInterceptors = checkNotNull(requestInterceptors, "requestInterceptors"); this.logger = checkNotNull(logger, "logger"); this.logLevel = checkNotNull(logLevel, "logLevel"); this.decode404 = decode404; }
/** * @param message the reason for the failure. */ public EncodeException(String message) { super(checkNotNull(message, "message")); }
/** * No parameters can be null except {@code body}. All parameters must be effectively * immutable, via safe copies, not mutating or otherwise. */ public ReactiveHttpRequest(HttpMethod method, URI uri, MultiValueMap<String, String> headers, Publisher<Object> body) { this.method = checkNotNull(method, "method of %s", uri); this.uri = checkNotNull(uri, "url"); this.headers = checkNotNull(headers, "headers of %s %s", method, uri); this.body = body; // nullable }
private ReactiveInvocationHandler(final Target<?> target, final Map<Method, MethodHandler> dispatch) { this.target = checkNotNull(target, "target must not be null"); this.dispatch = checkNotNull(dispatch, "dispatch must not be null"); }
ParseHandlersByName(Contract contract, Options options, Encoder encoder, Decoder decoder, ErrorDecoder errorDecoder, SynchronousMethodHandler.Factory factory) { this.contract = contract; this.options = options; this.factory = factory; this.errorDecoder = errorDecoder; this.encoder = checkNotNull(encoder, "encoder"); this.decoder = checkNotNull(decoder, "decoder"); }
public HystrixMethodHandlerFactory(MethodHandlerFactory methodHandlerFactory, CloudReactiveFeign.SetterFactory commandSetterFactory, @Nullable Function<Throwable, Object> fallbackFactory) { this.methodHandlerFactory = checkNotNull(methodHandlerFactory, "methodHandlerFactory must not be null"); this.commandSetterFactory = checkNotNull(commandSetterFactory, "hystrixObservableCommandSetter must not be null"); this.fallbackFactory = fallbackFactory; }
public Factory(ReactiveMethodHandlerFactory methodHandlerFactory, CloudReactiveFeign.SetterFactory commandSetterFactory, @Nullable Function<Throwable, Object> fallbackFactory) { this.methodHandlerFactory = checkNotNull(methodHandlerFactory, "methodHandlerFactory must not be null"); this.commandSetterFactory = checkNotNull(commandSetterFactory, "hystrixObservableCommandSetter must not be null"); this.fallbackFactory = fallbackFactory; }
SentinelInvocationHandler(Target<?> target, Map<Method, MethodHandler> dispatch, FallbackFactory fallbackFactory) { this.target = checkNotNull(target, "target"); this.dispatch = checkNotNull(dispatch, "dispatch"); this.fallbackFactory = fallbackFactory; this.fallbackMethodMap = toFallbackMethod(dispatch); }
private ReactiveInvocationHandler(final Target<?> target, final Map<Method, MethodHandler> dispatch) { this.target = checkNotNull(target, "target must not be null"); this.dispatch = checkNotNull(dispatch, "dispatch must not be null"); defineObjectMethodsHandlers(); }
public RequestTemplate(RequestTemplate toCopy) { checkNotNull(toCopy, "toCopy"); this.method = toCopy.method; this.url.append(toCopy.url); this.queries.putAll(toCopy.queries); this.headers.putAll(toCopy.headers); this.charset = toCopy.charset; this.body = toCopy.body; this.bodyTemplate = toCopy.bodyTemplate; this.decodeSlash = toCopy.decodeSlash; }
public HardCodedTarget(Class<T> type, String name, String url) { this.type = checkNotNull(type, "type"); this.name = checkNotNull(emptyToNull(name), "name"); this.url = checkNotNull(emptyToNull(url), "url"); }
public RequestTemplate method(String method) { this.method = checkNotNull(method, "method"); checkArgument(method.matches("^[A-Z]+$"), "Invalid HTTP Method: %s", method); return this; }
private static Body orNull(String text, Charset charset) { if (text == null) { return null; } checkNotNull(charset, "charset"); return new ByteArrayBody(text.getBytes(charset)); }
protected ReactiveFeign build() { checkNotNull(this.webClient, "WebClient instance wasn't provided in ReactiveFeign builder"); final ParseHandlersByName handlersByName = new ParseHandlersByName(contract, buildReactiveMethodHandlerFactory()); return new ReactiveFeign(handlersByName, invocationHandlerFactory); }