/** * Sets the maximum size of any one header. Default value ({@value #DEFAULT_MAXHEADERSIZE}). * @param maxHeaderSize The max header size */ public void setMaxHeaderSize(@ReadableBytes int maxHeaderSize) { this.maxHeaderSize = maxHeaderSize; }
private <S, T> ConvertiblePair newPair(Class<S> sourceType, Class<T> targetType, TypeConverter<S, T> typeConverter) { ConvertiblePair pair; if (typeConverter instanceof FormattingTypeConverter) { pair = new ConvertiblePair(sourceType, targetType, ((FormattingTypeConverter) typeConverter).annotationType()); } else { pair = new ConvertiblePair(sourceType, targetType); } return pair; }
addConverter(CharSequence.class, Number.class, new ReadableBytesTypeConverter());
/** * Sets the maximum size of any single request chunk. Default value ({@value #DEFAULT_MAXCHUNKSIZE}). * @param maxChunkSize The max chunk size */ public void setMaxChunkSize(@ReadableBytes int maxChunkSize) { this.maxChunkSize = maxChunkSize; }
/** * Sets the maximum request size. Default value ({@value #DEFAULT_MAX_REQUEST_SIZE} => // 10MB) * * @param maxRequestSize The max request size */ public void setMaxRequestSize(@ReadableBytes long maxRequestSize) { this.maxRequestSize = maxRequestSize; }
/** * Sets the max file size. Default value ({@value #DEFAULT_MAX_FILE_SIZE} => 1MB). * @param maxFileSize The max file size */ public void setMaxFileSize(@ReadableBytes long maxFileSize) { this.maxFileSize = maxFileSize; }
/** * Sets the maximum content length the client can consume. Default value ({@value io.micronaut.http.client.HttpClientConfiguration#DEFAULT_MAX_CONTENT_LENGTH} => 10MB). * * @param maxContentLength The maximum content length the client can consume */ public void setMaxContentLength(@ReadableBytes int maxContentLength) { this.maxContentLength = maxContentLength; }
/** * Sets the amount of data that should be received that will trigger * the data to be stored to disk. Default value ({@value #DEFAULT_THRESHOLD}). * * @param threshold The threshold */ public void setThreshold(@ReadableBytes long threshold) { this.threshold = threshold; } }
/** * Sets the maximum initial line length for the HTTP request. Default value ({@value #DEFAULT_MAXINITIALLINELENGTH}). * @param maxInitialLineLength The max length */ public void setMaxInitialLineLength(@ReadableBytes int maxInitialLineLength) { this.maxInitialLineLength = maxInitialLineLength; }
/** * Sets the minimum size of a request body must be in order to be compressed. Default value ({@value #DEFAULT_COMPRESSIONTHRESHOLD}). * @param compressionThreshold The size request bodies must be in order to be a candidate for compression. */ public void setCompressionThreshold(@ReadableBytes int compressionThreshold) { this.compressionThreshold = compressionThreshold; }
/** * Sets the maximum content length the client can consume. Default value ({@value io.micronaut.http.client.HttpClientConfiguration#DEFAULT_MAX_CONTENT_LENGTH} => 10MB). * * @param maxContentLength The maximum content length the client can consume */ public void setMaxContentLength(@ReadableBytes int maxContentLength) { this.maxContentLength = maxContentLength; }
/** * Sets the maximum request size. Default value ({@value #DEFAULT_MAX_REQUEST_SIZE} => // 10MB) * * @param maxRequestSize The max request size */ public void setMaxRequestSize(@ReadableBytes long maxRequestSize) { this.maxRequestSize = maxRequestSize; }
/** * Sets the maximum content length the client can consume. Default value ({@value io.micronaut.http.client.HttpClientConfiguration#DEFAULT_MAX_CONTENT_LENGTH} => 10MB). * * @param maxContentLength The maximum content length the client can consume */ public void setMaxContentLength(@ReadableBytes int maxContentLength) { this.maxContentLength = maxContentLength; }
/** * Sets the max file size. Default value ({@value #DEFAULT_MAX_FILE_SIZE} => 1MB). * @param maxFileSize The max file size */ public void setMaxFileSize(@ReadableBytes long maxFileSize) { this.maxFileSize = maxFileSize; }
/** * Default value ({@value #DEFAULT_THRESHOLD} => 10MB). * @param threshold Set the threshold */ protected void setThreshold(@ReadableBytes long threshold) { this.threshold = threshold; } }
/** * Default value ({@value #DEFAULT_THRESHOLD} => 10MB). * @param threshold Set the threshold */ protected void setThreshold(@ReadableBytes long threshold) { this.threshold = threshold; } }