/** * Used by Jackson. */ @Internal JsonError() { }
/** * Used by Jackson. */ @Internal VndError() { } }
/** * Used by Jackson. */ @Internal VndError() { this(null); } }
/** * Creates a SmartHttpContentCompressor with the default compression threshold. * * @see #SmartHttpContentCompressor(int) */ @Internal public SmartHttpContentCompressor() { this(NettyHttpServerConfiguration.DEFAULT_COMPRESSIONTHRESHOLD); }
/** * @param bodyRequired Sets the body as required */ @Internal void setBodyRequired(boolean bodyRequired) { this.bodyRequired = bodyRequired; }
/** * An empty representation of {@link AnnotationMetadata}. * * @author Graeme Rocher * @since 1.0 */ @Internal class EmptyAnnotationMetadata implements AnnotationMetadata { }
/** * @return Obtains the matched route */ @Internal public RouteMatch<?> getMatchedRoute() { return matchedRoute; }
/** * @param matchedRoute The matched route */ @Internal void setMatchedRoute(RouteMatch<?> matchedRoute) { this.matchedRoute = matchedRoute; }
/** * Internal attributes for the adapter annotation. */ @Internal class InternalAttributes { public static final String ADAPTED_BEAN = "adaptedBean"; public static final String ADAPTED_METHOD = "adaptedMethod"; public static final String ADAPTED_ARGUMENT_TYPES = "adaptedArgumentTypes"; public static final String ADAPTED_QUALIFIER = "adaptedQualifier"; } }
/** * Used by Jackson. */ @Internal JsonError() { this(null); }
/** * Internal copy constructor. * @param target The target * @param defaultValues The default values * @param convertibleValues The convertible values */ @Internal @UsedByGeneratedCode protected AnnotationValue(AnnotationValue<A> target, Map<String, Object> defaultValues, ConvertibleValues<Object> convertibleValues) { this.annotationName = target.annotationName; this.defaultValues = defaultValues != null ? defaultValues : target.defaultValues; this.values = target.values; this.convertibleValues = convertibleValues; }
/** * Delegate for Streamed HTTP Response. * * @author Graeme Rocher * @since 1.0 */ @Internal final class DelegateStreamedHttpResponse extends DelegateHttpResponse implements StreamedHttpResponse { private final Publisher<HttpContent> stream; /** * @param response The {@link HttpResponse} * @param stream The {@link Publisher} for {@link HttpContent} */ DelegateStreamedHttpResponse(HttpResponse response, Publisher<HttpContent> stream) { super(response); this.stream = stream; } @Override public void subscribe(Subscriber<? super HttpContent> subscriber) { stream.subscribe(subscriber); } }
/** * Delegate for Streamed HTTP Response. * * @author jroper * @author Graeme Rocher * @since 1.0 */ @Internal final class DelegateStreamedHttpResponse extends DelegateHttpResponse implements StreamedHttpResponse { private final Publisher<HttpContent> stream; /** * @param response The {@link HttpResponse} * @param stream The {@link Publisher} for {@link HttpContent} */ DelegateStreamedHttpResponse(HttpResponse response, Publisher<HttpContent> stream) { super(response); this.stream = stream; } @Override public void subscribe(Subscriber<? super HttpContent> subscriber) { stream.subscribe(subscriber); } }
/** * Delegate for Streamed HTTP Request. * * @author jroper * @author Graeme Rocher * @since 1.0 */ @Internal final class DelegateStreamedHttpRequest extends DelegateHttpRequest implements StreamedHttpRequest { private final Publisher<HttpContent> stream; /** * @param request The Http request * @param stream The publisher */ DelegateStreamedHttpRequest(HttpRequest request, Publisher<HttpContent> stream) { super(request); this.stream = stream; } @Override public void subscribe(Subscriber<? super HttpContent> subscriber) { stream.subscribe(subscriber); } }
/** * Disables the client beans if the appropriate configuration is not present. * * @author graemerocher * @since 1.0 */ @Internal final class ServiceHttpClientCondition implements Condition { @Override public boolean matches(ConditionContext context) { AnnotationMetadataProvider component = context.getComponent(); BeanContext beanContext = context.getBeanContext(); if (beanContext instanceof ApplicationContext) { Environment env = ((ApplicationContext) beanContext).getEnvironment(); if (component instanceof ValueResolver) { Optional<String> optional = ((ValueResolver) component).get(Named.class.getName(), String.class); if (optional.isPresent()) { String serviceName = optional.get(); String urlProp = ServiceHttpClientConfiguration.PREFIX + "." + serviceName + ".url"; return env.containsProperty(urlProp) || env.containsProperty(urlProp + "s"); } } } return true; } }
/** * Information about a class being parsed in a {@link org.objectweb.asm.ClassReader}. * * @author Eric Bruneton */ @Internal class Context { /** * Prototypes of the attributes that must be parsed for this class. */ Attribute[] attrs; /** * The {@link org.objectweb.asm.ClassReader} option flags for the parsing of this class. */ int flags; /** * The buffer used to read strings. */ char[] buffer; /** * The start index of each bootstrap method. */ int[] bootstrapMethods; }
@Internal public class ClientServerContextFilter implements HttpClientFilter {
/** * Sets the body. * * @param body The body to set */ @Internal public void setBody(T body) { this.body = () -> Optional.ofNullable(body); this.convertedBodies.clear(); }
/** * A {@link TypeConverter} that converts {@link CharSequence} instances to Netty {@link ChannelOption} instances. * * @author Graeme Rocher * @since 1.0 */ @Singleton @Internal public class NettyChannelOptionConverter implements TypeConverter<CharSequence, ChannelOption> { @Override public Optional<ChannelOption> convert(CharSequence object, Class<ChannelOption> targetType, ConversionContext context) { String str = object.toString(); String name = NameUtils.underscoreSeparate(str).toUpperCase(Locale.ENGLISH); ChannelOption<Object> channelOption = ChannelOption.valueOf(name); if (channelOption != null) { return Optional.of(channelOption); } return Optional.empty(); } }
/** * Default constructor. * * @param name The name of the property source in the config server * @param source The map containing the configuration entries */ @JsonCreator @Internal protected ConfigServerPropertySource(@JsonProperty("name") String name, @JsonProperty("source") Map<String, Object> source) { this.name = name; this.source = source == null ? Collections.emptyMap() : Collections.unmodifiableMap(source); }