/** * 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; }
/** * Sets the body. * * @param body The body to set */ @Internal public void setBody(T body) { this.body = () -> Optional.ofNullable(body); this.convertedBodies.clear(); }
/** * 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); }
/** * A special type for files specific to Netty. * * @author James Kleeh * @since 1.0 */ @Internal @Experimental public interface NettyFileCustomizableResponseType extends FileCustomizableResponseType, NettyCustomizableResponseType { }
/** * Lookup the response from the request. * * @param request The request * @return The {@link NettyMutableHttpResponse} */ @Internal public static Optional<NettyMutableHttpResponse> get(NettyHttpRequest<?> request) { NettyMutableHttpResponse nettyHttpResponse = request.attr(KEY).get(); return Optional.ofNullable(nettyHttpResponse); }
@Override @Internal public void close() throws IOException { if (closeContext && applicationContext != null) { applicationContext.close(); } }
/** * @param httpContent The HttpContent as {@link ByteBufHolder} */ @Internal void addContent(ByteBufHolder httpContent) { if (httpContent instanceof AbstractHttpData) { receivedData.computeIfAbsent(System.identityHashCode(httpContent), (key) -> { httpContent.retain(); return (AbstractHttpData) httpContent; }); } else { receivedContent.add(httpContent); } }
/** * @return Whether the body is required */ @Internal boolean isBodyRequired() { return bodyRequired || HttpMethod.requiresRequestBody(getMethod()); }
/** * Lookup the response from the context. * * @param request The context * @return The {@link NettyMutableHttpResponse} */ @Internal public static NettyMutableHttpResponse getOrCreate(NettyHttpRequest<?> request) { return getOr(request, io.micronaut.http.HttpResponse.ok()); }
/** * Resolves the {@link Around} interceptors for a method. * * @param beanContext bean context passed in * @param method The method * @param interceptors The array of interceptors * @return The filtered array of interceptors */ @Internal public static Interceptor[] resolveAroundInterceptors(BeanContext beanContext, ExecutableMethod<?, ?> method, Interceptor... interceptors) { instrumentAnnotationMetadata(beanContext, method); return resolveInterceptorsInternal(method, Around.class, interceptors); }