Index
All Classes and Interfaces|All Packages|Serialized Form
A
- abort(boolean) - Method in class com.github.mizosoft.methanol.internal.flow.AbstractQueueSubscription
- abort(boolean) - Method in class com.github.mizosoft.methanol.internal.flow.AbstractSubscription
-
Releases resources held by this subscription.
- AbstractBodyAdapter - Class in com.github.mizosoft.methanol.adapter
-
An abstract
BodyAdapterthat implementsBodyAdapter.isCompatibleWith(MediaType)by allowing subclasses to specify a set ofMediaTypesthe adapter is compatible with. - AbstractBodyAdapter(MediaType...) - Constructor for class com.github.mizosoft.methanol.adapter.AbstractBodyAdapter
-
Creates an
AbstractBodyAdaptercompatible with the given media types. - AbstractBodyAdapter.BaseDecoder - Interface in com.github.mizosoft.methanol.adapter
-
This interface abstracts the more-capable
AbstractBodyAdapter.BaseDecoder.toObject(TypeRef, Hints)method and adds a default implementation forAbstractBodyAdapter.BaseDecoder.toObject(TypeRef, MediaType)that forwards to the former. - AbstractBodyAdapter.BaseEncoder - Interface in com.github.mizosoft.methanol.adapter
-
This interface abstracts the more-capable
AbstractBodyAdapter.BaseEncoder.toBody(Object, TypeRef, Hints)method and adds a default implementation forAbstractBodyAdapter.BaseEncoder.toBody(Object, MediaType)that forwards to the former. - AbstractPollableSubscription<T> - Class in com.github.mizosoft.methanol.internal.flow
-
A subscription that emits items from a pollable source.
- AbstractPollableSubscription(Flow.Subscriber, Executor) - Constructor for class com.github.mizosoft.methanol.internal.flow.AbstractPollableSubscription
- AbstractQueueSubscription<T> - Class in com.github.mizosoft.methanol.internal.flow
-
A subscription that emits items from a queue and completes downstream as soon as a sentinel value is observed.
- AbstractQueueSubscription(Flow.Subscriber, Executor) - Constructor for class com.github.mizosoft.methanol.internal.flow.AbstractQueueSubscription
- AbstractQueueSubscription(Flow.Subscriber, Executor, Queue) - Constructor for class com.github.mizosoft.methanol.internal.flow.AbstractQueueSubscription
- AbstractQueueSubscription(Flow.Subscriber, Executor, Queue, T) - Constructor for class com.github.mizosoft.methanol.internal.flow.AbstractQueueSubscription
- AbstractSubscription<T> - Class in com.github.mizosoft.methanol.internal.flow
-
An abstract
Flow.Subscriptionthat implements most of the machinery for execution and backpressure control. - AbstractSubscription(Flow.Subscriber, Executor) - Constructor for class com.github.mizosoft.methanol.internal.flow.AbstractSubscription
- accept(T) - Method in interface com.github.mizosoft.methanol.function.ThrowingConsumer
- accept(T, U) - Method in interface com.github.mizosoft.methanol.internal.function.ThrowingBiConsumer
- adapterCodec() - Method in class com.github.mizosoft.methanol.Methanol
- adapterCodec() - Method in class com.github.mizosoft.methanol.MutableRequest
-
Returns the
AdapterCodecto be used for resolving this request's payload. - adapterCodec(AdapterCodec) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Specifies the
AdapterCodecwith which request and response payloads are mapped. - adapterCodec(AdapterCodec) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Set's the
AdapterCodecto be used for resolving this request's payload. - AdapterCodec - Class in com.github.mizosoft.methanol
-
A group of
adapters(encoders&decoders), typically targeting different mapping schemes, that facilitates creating correspondingHttpRequest.BodyPublisher,HttpResponse.BodyHandlerandHttpResponse.BodySubscriberimplementations. - AdapterCodec.Builder - Class in com.github.mizosoft.methanol
-
A builder of
AdapterCodecinstances. - add(String, String) - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- addAll(HeadersBuilder) - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- addAll(String...) - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- addAll(HttpHeaders) - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- addAllLenient(HttpHeaders) - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- addCacheHeaders(ResponseBuilder) - Method in class com.github.mizosoft.methanol.internal.cache.CacheStrategy
- addLenient(String, String) - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- allMatch(CharSequence) - Method in interface com.github.mizosoft.methanol.internal.text.CharMatcher
- ANY - Static variable in class com.github.mizosoft.methanol.MediaType
-
*/* - anyMaxStale() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns whether the
max-staledirective is present but has no value, which indicates that a response with any staleness is acceptable. - anyMaxStale() - Method in class com.github.mizosoft.methanol.CacheControl.Builder
-
Sets the
max-staledirective to accept any stale response. - anyOf(String) - Static method in interface com.github.mizosoft.methanol.internal.text.CharMatcher
- APPLICATION_ANY - Static variable in class com.github.mizosoft.methanol.MediaType
-
application/* - APPLICATION_FORM_URLENCODED - Static variable in class com.github.mizosoft.methanol.MediaType
-
application/x-www-form-urlencoded - APPLICATION_JSON - Static variable in class com.github.mizosoft.methanol.MediaType
-
application/json - APPLICATION_OCTET_STREAM - Static variable in class com.github.mizosoft.methanol.MediaType
-
application/octet-stream - APPLICATION_X_PROTOBUF - Static variable in class com.github.mizosoft.methanol.MediaType
-
application/x-protobuf - APPLICATION_XHTML_XML - Static variable in class com.github.mizosoft.methanol.MediaType
-
application/xhtml+xml - APPLICATION_XML - Static variable in class com.github.mizosoft.methanol.MediaType
-
application/xml - apply(Consumer) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Calls the given consumer against this builder.
- apply(Consumer) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Calls the given consumer against this request.
- apply(Consumer) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- apply(T) - Method in interface com.github.mizosoft.methanol.internal.function.ThrowingFunction
- appVersion(int) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore.Builder
- asHeadersAccumulator() - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- AsyncBodyDecoder<T> - Class in com.github.mizosoft.methanol.decoder
-
An implementation of
BodyDecoderthat uses anAsyncDecoderfor decompression. - AsyncBodyDecoder(AsyncDecoder, HttpResponse.BodySubscriber) - Constructor for class com.github.mizosoft.methanol.decoder.AsyncBodyDecoder
-
Creates an
AsyncBodyDecoderin sync mode. - AsyncBodyDecoder(AsyncDecoder, HttpResponse.BodySubscriber, Executor) - Constructor for class com.github.mizosoft.methanol.decoder.AsyncBodyDecoder
-
Creates an
AsyncBodyDecoderthat supplies downstream items in the given executor. - AsyncBodyDecoder(AsyncDecoder, HttpResponse.BodySubscriber, Executor, int) - Constructor for class com.github.mizosoft.methanol.decoder.AsyncBodyDecoder
-
Creates an
AsyncBodyDecoderthat supplies downstream items in the given executor. - asyncDecoder() - Method in class com.github.mizosoft.methanol.decoder.AsyncBodyDecoder
-
Returns the underlying
AsyncDecoder. - AsyncDecoder - Interface in com.github.mizosoft.methanol.decoder
-
An object that decompresses
ByteBufferchunks of a compressed stream in a non-blocking manner. - AsyncDecoder.ByteSink - Interface in com.github.mizosoft.methanol.decoder
-
A sink of bytes for writing the decompressed stream as
ByteBufferchunks. - AsyncDecoder.ByteSource - Interface in com.github.mizosoft.methanol.decoder
-
A source of bytes for reading the compressed stream as
ByteBufferchunks. - AsyncSubscriberAdapter<T,
S> - Class in com.github.mizosoft.methanol.internal.extensions -
Adapts a subscriber to a
BodySubscriberwhere the body's completion need not be in accordance withonCompleteoronError. - AsyncSubscriberAdapter(S, Function) - Constructor for class com.github.mizosoft.methanol.internal.extensions.AsyncSubscriberAdapter
- attachMediaType(HttpRequest.BodyPublisher, MediaType) - Static method in class com.github.mizosoft.methanol.adapter.AbstractBodyAdapter
-
Converts the given publisher into a
MimeBodyPublisherthat has the given media type only if it is notnullorhas a wildcard, otherwise the given publisher is returned as-is. - authenticator() - Method in class com.github.mizosoft.methanol.Methanol
- authenticator(Authenticator) - Method in class com.github.mizosoft.methanol.Methanol.Builder
- autoAcceptEncoding() - Method in class com.github.mizosoft.methanol.Methanol
-
Returns this client's
auto Accept-Encodingsetting. - autoAcceptEncoding(boolean) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
If enabled, each request will have an
Accept-Encodingheader appended, the value of which is the set ofsupported encodings.
B
- backendInterceptor(Methanol.Interceptor) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Adds an interceptor that is invoked right before the request is forwarded to the client's backend.
- backendInterceptors() - Method in class com.github.mizosoft.methanol.Methanol
-
Returns an immutable list of this client's
backend interceptors. - backoff(RetryInterceptor.BackoffStrategy) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies the
BackoffStrategyto apply every retry. - backoff(RetryInterceptor.Context) - Method in interface com.github.mizosoft.methanol.RetryInterceptor.BackoffStrategy
-
Returns the
Durationto wait for before retrying the request for the given retry number. - baseUri() - Method in class com.github.mizosoft.methanol.Methanol
-
Returns this client's base URI.
- baseUri(String) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
- baseUri(URI) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
- basic() - Method in class com.github.mizosoft.methanol.AdapterCodec.Builder
- basic() - Static method in interface com.github.mizosoft.methanol.BodyAdapter.Decoder
-
Returns the basic decoder.
- basic() - Static method in interface com.github.mizosoft.methanol.BodyAdapter.Encoder
-
Returns the basic encoder.
- BasicAdapter - Class in com.github.mizosoft.methanol.internal.adapter
-
An adapter for basic types (e.g.,
String,byte[]). - basicDecoder() - Method in class com.github.mizosoft.methanol.AdapterCodec.Builder
-
Adds the
basic decoder. - basicEncoder() - Method in class com.github.mizosoft.methanol.AdapterCodec.Builder
-
Adds the
basic encoder. - beginWith(Function) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies the request modifier to be applied before the request is sent for the first time (attempt 0, not a retry).
- bindings() - Static method in class com.github.mizosoft.methanol.internal.spi.BodyDecoderFactoryProviders
- body(U) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- BodyAdapter - Interface in com.github.mizosoft.methanol
-
An object that converts objects to or from request or response bodies respectively, using a defined format.
- BodyAdapter.Decoder - Interface in com.github.mizosoft.methanol
-
A
BodyAdapterthat decodes response bodies into objects. - BodyAdapter.Encoder - Interface in com.github.mizosoft.methanol
-
A
BodyAdapterthat encodes objects into request bodies. - BodyAdapter.Hints - Interface in com.github.mizosoft.methanol
-
A collection of hints that provide additional context to customize an adapter's encoding/decoding behavior.
- BodyAdapter.Hints.Builder - Class in com.github.mizosoft.methanol
-
A builder of
Hintobjects. - BodyDecoder<T> - Interface in com.github.mizosoft.methanol
-
A
HttpResponse.BodySubscriberthat decodes the response body for consumption by a downstream subscriber. - BodyDecoder.Factory - Interface in com.github.mizosoft.methanol
-
A factory of
BodyDecoderinstances for some defined encoding. - BodyDecoderFactoryProviders - Class in com.github.mizosoft.methanol.internal.spi
-
Utility class for finding decoder factories.
- BodyDiscardTimeoutHint - Class in com.github.mizosoft.methanol.internal.adapter
- BodyDiscardTimeoutHint(Timeout) - Constructor for class com.github.mizosoft.methanol.internal.adapter.BodyDiscardTimeoutHint
- bodyHandler() - Static method in class com.github.mizosoft.methanol.internal.extensions.PublisherBodySubscriber
- bodyHandler() - Method in interface com.github.mizosoft.methanol.Methanol.Interceptor.Chain
-
Returns the
BodyHandlerthis chain uses for handling the response. - bodyPublisher() - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher.Part
-
Returns the
BodyPublisherof this part's content. - bodyPublisher() - Method in class com.github.mizosoft.methanol.MutableRequest
- boundary() - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher
-
Returns the boundary of this multipart body.
- boundary(String) - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher.Builder
-
Sets the boundary of the multipart body.
- BOUNDARY_MATCHER - Static variable in class com.github.mizosoft.methanol.internal.text.HttpCharMatchers
- BUFFER_SIZE - Static variable in class com.github.mizosoft.methanol.internal.Utils
- build() - Method in class com.github.mizosoft.methanol.AdapterCodec.Builder
-
Returns a new
AdapterCodeccontaining the encoders and decoders added so far. - build() - Method in class com.github.mizosoft.methanol.BodyAdapter.Hints.Builder
-
Returns a new
Hintsobject containing the hints added so far. - build() - Method in class com.github.mizosoft.methanol.CacheControl.Builder
-
Builds a new
Cache-Control. - build() - Method in class com.github.mizosoft.methanol.FormBodyPublisher.Builder
-
Returns a new
FormBodyPublisherwith the added queries. - build() - Method in class com.github.mizosoft.methanol.HttpCache.Builder
-
Creates a new
HttpCache. - build() - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore.Builder
- build() - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- build() - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Creates a new
Methanolinstance. - build() - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher.Builder
-
Returns a new
MultipartBodyPublisher. - build() - Method in class com.github.mizosoft.methanol.MutableRequest
-
Returns an immutable copy of this request.
- build() - Method in class com.github.mizosoft.methanol.ProgressTracker.Builder
-
Builds a new
ProgressTracker. - build() - Method in class com.github.mizosoft.methanol.ResponseBuilder
- build() - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Builds a new
RetryInterceptorthat retries all requests based on the conditions specified so far. - build() - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
- build(BiPredicate) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Builds a new
RetryInterceptorthat only retries requests matched by the given predicate based on the conditions specified so far. - build(Predicate) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Builds a new
RetryInterceptorthat only retries requests matched by the given predicate based on the conditions specified so far. - buildCacheAwareResponse() - Method in class com.github.mizosoft.methanol.ResponseBuilder
- Builder() - Constructor for class com.github.mizosoft.methanol.MultipartBodyPublisher.Builder
- buildTrackedResponse() - Method in class com.github.mizosoft.methanol.ResponseBuilder
- ByteBufferBodyPublisher - Class in com.github.mizosoft.methanol.internal.extensions
- ByteBufferBodyPublisher(ByteBuffer) - Constructor for class com.github.mizosoft.methanol.internal.extensions.ByteBufferBodyPublisher
- ByteBufferBodyPublisher(ByteBuffer, int) - Constructor for class com.github.mizosoft.methanol.internal.extensions.ByteBufferBodyPublisher
- byteChannel() - Method in class com.github.mizosoft.methanol.WritableBodyPublisher
-
Returns a
WritableByteChannelfor writing this body's content. - ByteChannelBodySubscriber - Class in com.github.mizosoft.methanol.internal.extensions
-
A subscriber that exposes the flow of bytes as a
ReadableByteChannel. - ByteChannelBodySubscriber() - Constructor for class com.github.mizosoft.methanol.internal.extensions.ByteChannelBodySubscriber
- bytesTransferred() - Method in interface com.github.mizosoft.methanol.ProgressTracker.Progress
-
Returns the number of transferred bytes for this event.
- bytesTransferredThreshold() - Method in class com.github.mizosoft.methanol.ProgressTracker
-
Returns the minimum number of bytes to be transferred for a progress event to be signalled.
- bytesTransferredThreshold(long) - Method in class com.github.mizosoft.methanol.ProgressTracker.Builder
-
Sets the minimum number of transferred bytes for a progress event to be signalled.
C
- cache() - Method in class com.github.mizosoft.methanol.Methanol
-
Returns this client's
cache. - cache(HttpCache) - Method in class com.github.mizosoft.methanol.Methanol.Builder
-
Sets the
HttpCacheto be used by the client. - CacheAwareResponse<T> - Interface in com.github.mizosoft.methanol
-
A
TrackedResponsethat knows it may have been generated from an HTTP cache. - CacheAwareResponse.CacheStatus - Enum in com.github.mizosoft.methanol
-
The status of an attempt to retrieve an HTTP response from cache.
- cacheChain(List) - Method in class com.github.mizosoft.methanol.Methanol.Builder
-
Sets a chain of caches to be called one after another, in the order specified by the given list.
- cacheControl(CacheControl) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Sets the
Cache-Controlheader to the given value. - CacheControl - Class in com.github.mizosoft.methanol
-
A group of cache directives.
- CacheControl.Builder - Class in com.github.mizosoft.methanol
-
A builder of
CacheControlinstances, with explicit directive setters for request cache directives. - CacheInterceptor - Class in com.github.mizosoft.methanol.internal.cache
-
An
Methanol.Interceptorthat serves incoming requests from cache, network, both (in case of successful/failed revalidation), or none (in case of unsatisfiable requests). - CacheInterceptor(LocalCache.Factory, HttpCache.Listener, Executor, Clock, boolean, Predicate) - Constructor for class com.github.mizosoft.methanol.internal.cache.CacheInterceptor
- cacheOn(StorageExtension) - Method in class com.github.mizosoft.methanol.HttpCache.Builder
-
Specifies that HTTP responses are to be persisted on the given storage extension.
- cacheOnDisk(Path, long) - Method in class com.github.mizosoft.methanol.HttpCache.Builder
-
Specifies that HTTP responses are to be persisted on disk, under the given directory, with the given size bound.
- cacheOnMemory(long) - Method in class com.github.mizosoft.methanol.HttpCache.Builder
-
Specifies that HTTP responses are to be cached on memory with the given size bound.
- CacheReadingPublisher - Class in com.github.mizosoft.methanol.internal.cache
-
Publisher for the response body as read from a cached entry's
Store.Viewer. - CacheReadingPublisher(Store.Viewer, Executor) - Constructor for class com.github.mizosoft.methanol.internal.cache.CacheReadingPublisher
- CacheReadingPublisher(Store.Viewer, Executor, CacheReadingPublisher.Listener) - Constructor for class com.github.mizosoft.methanol.internal.cache.CacheReadingPublisher
- CacheReadingPublisher(Store.Viewer, Executor, CacheReadingPublisher.Listener, int) - Constructor for class com.github.mizosoft.methanol.internal.cache.CacheReadingPublisher
- CacheReadingPublisher.Listener - Interface in com.github.mizosoft.methanol.internal.cache
- cacheResponse() - Method in interface com.github.mizosoft.methanol.CacheAwareResponse
-
Returns an
Optionalfor the response constructed from cache. - cacheResponse(TrackedResponse) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- CacheResponse - Class in com.github.mizosoft.methanol.internal.cache
-
A
RawResponseretrieved from cache. - CacheResponse(TrackedResponse, Store.Viewer, Executor, CacheReadingPublisher.Listener) - Constructor for class com.github.mizosoft.methanol.internal.cache.CacheResponse
- CacheResponseMetadata - Class in com.github.mizosoft.methanol.internal.cache
-
Metadata for each response entry in the cache.
- caches() - Method in class com.github.mizosoft.methanol.Methanol
- cacheStatus() - Method in interface com.github.mizosoft.methanol.CacheAwareResponse
-
Returns this response's
CacheAwareResponse.CacheStatus. - cacheStatus(CacheAwareResponse.CacheStatus) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- CacheStrategy - Class in com.github.mizosoft.methanol.internal.cache
-
A strategy for determining whether a stored response is fresh enough for the cache to serve without contacting the origin, based on the caching rules imposed by the server and client.
- CacheWritingPublisher - Class in com.github.mizosoft.methanol.internal.cache
-
A
Publisherthat writes the body stream into cache while simultaneously forwarding it to downstream. - CacheWritingPublisher(Flow.Publisher, Store.Editor, ByteBuffer, Executor) - Constructor for class com.github.mizosoft.methanol.internal.cache.CacheWritingPublisher
- CacheWritingPublisher(Flow.Publisher, Store.Editor, ByteBuffer, Executor, CacheWritingPublisher.Listener) - Constructor for class com.github.mizosoft.methanol.internal.cache.CacheWritingPublisher
- CacheWritingPublisher(Flow.Publisher, Store.Editor, ByteBuffer, Executor, CacheWritingPublisher.Listener, boolean) - Constructor for class com.github.mizosoft.methanol.internal.cache.CacheWritingPublisher
- CacheWritingPublisher.Listener - Interface in com.github.mizosoft.methanol.internal.cache
- cancel() - Method in class com.github.mizosoft.methanol.internal.flow.AbstractSubscription
- cancel() - Method in class com.github.mizosoft.methanol.internal.flow.Upstream
-
Cancels the upstream if set.
- cancel(boolean) - Method in class com.github.mizosoft.methanol.internal.concurrent.CancellationPropagatingFuture
- cancel(boolean) - Method in class com.github.mizosoft.methanol.internal.flow.Upstream
- CancellationPropagatingFuture<T> - Class in com.github.mizosoft.methanol.internal.concurrent
-
A
CompletableFuturethat propagates cancellation to an upstream when a node in the dependency tree starting from this future is canceled. - cancelOnComplete(Flow.Subscriber) - Method in class com.github.mizosoft.methanol.internal.flow.AbstractSubscription
-
Calls downstream's
onCompleteafter cancelling this subscription. - cancelOnError(Flow.Subscriber, Throwable, boolean) - Method in class com.github.mizosoft.methanol.internal.flow.AbstractSubscription
-
Calls downstream's
onErrorwith the given exception after cancelling this subscription. - canReplaceStoredHeader(String) - Static method in class com.github.mizosoft.methanol.internal.cache.CacheInterceptor
- castNonNull(T) - Static method in class com.github.mizosoft.methanol.internal.Validate
-
Copied from checker-framework's
NullnessUtilto avoid a runtime dependency. - CharMatcher - Interface in com.github.mizosoft.methanol.internal.text
-
Char matching API to use internally.
- charset() - Method in class com.github.mizosoft.methanol.MediaType
-
Returns an
Optionalrepresenting the value of the charset parameter. - charsetOrDefault(MediaType, Charset) - Static method in class com.github.mizosoft.methanol.adapter.AbstractBodyAdapter
-
Returns either the result of
MediaType.charsetOrDefault(Charset), or the given charset if the given media type isnull. - charsetOrDefault(Charset) - Method in class com.github.mizosoft.methanol.MediaType
-
Returns either the value of the charset parameter or the given default charset if no such parameter exists or if the charset has no support in this JVM.
- charsetOrUtf8() - Method in class com.github.mizosoft.methanol.MediaType
-
Equivalent to calling
charsetOrDefault(StandardCharsets.UTF_8). - charsetOrUtf8(MediaType) - Static method in class com.github.mizosoft.methanol.adapter.AbstractBodyAdapter
-
Returns either the result of
MediaType.charsetOrDefault(Charset), orUTF-8if the given media type isnull. - clear() - Method in class com.github.mizosoft.methanol.HttpCache
-
Removes all entries from this cache.
- clear() - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- clear() - Method in class com.github.mizosoft.methanol.internal.cache.MemoryStore
- clear() - Method in interface com.github.mizosoft.methanol.internal.cache.Store
-
Removes all entries from this store.
- clear() - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- clear() - Method in class com.github.mizosoft.methanol.internal.flow.Upstream
-
Just loses the reference to upstream if cancellation it is not required.
- clock(Clock) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore.Builder
- close() - Method in interface com.github.mizosoft.methanol.decoder.AsyncDecoder
-
Releases any resources associated with the decoder.
- close() - Method in class com.github.mizosoft.methanol.HttpCache
-
Closes this cache.
- close() - Method in class com.github.mizosoft.methanol.internal.cache.CacheResponse
- close() - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- close() - Method in class com.github.mizosoft.methanol.internal.cache.MemoryStore
- close() - Method in interface com.github.mizosoft.methanol.internal.cache.Store
-
Closes this store.
- close() - Method in interface com.github.mizosoft.methanol.internal.cache.Store.Editor
-
Closes this editor.
- close() - Method in interface com.github.mizosoft.methanol.internal.cache.Store.Viewer
-
Closes this viewer.
- close() - Method in interface com.github.mizosoft.methanol.ResponsePayload
-
Makes sure the resources held by this payload are released.
- close() - Method in class com.github.mizosoft.methanol.WritableBodyPublisher
-
Unless already closed, causes the subscribed (or yet to subscribe) client to be completed after the content written so far has been consumed.
- closeExceptionally(Throwable) - Method in class com.github.mizosoft.methanol.WritableBodyPublisher
-
Unless already closed, causes the subscribed (or yet to subscribe) client to fail with the given exception.
- com.github.mizosoft.methanol - package com.github.mizosoft.methanol
- com.github.mizosoft.methanol.adapter - package com.github.mizosoft.methanol.adapter
- com.github.mizosoft.methanol.decoder - package com.github.mizosoft.methanol.decoder
- com.github.mizosoft.methanol.function - package com.github.mizosoft.methanol.function
- com.github.mizosoft.methanol.internal - package com.github.mizosoft.methanol.internal
- com.github.mizosoft.methanol.internal.adapter - package com.github.mizosoft.methanol.internal.adapter
- com.github.mizosoft.methanol.internal.annotations - package com.github.mizosoft.methanol.internal.annotations
- com.github.mizosoft.methanol.internal.cache - package com.github.mizosoft.methanol.internal.cache
- com.github.mizosoft.methanol.internal.concurrent - package com.github.mizosoft.methanol.internal.concurrent
- com.github.mizosoft.methanol.internal.decoder - package com.github.mizosoft.methanol.internal.decoder
- com.github.mizosoft.methanol.internal.extensions - package com.github.mizosoft.methanol.internal.extensions
- com.github.mizosoft.methanol.internal.flow - package com.github.mizosoft.methanol.internal.flow
- com.github.mizosoft.methanol.internal.function - package com.github.mizosoft.methanol.internal.function
- com.github.mizosoft.methanol.internal.spi - package com.github.mizosoft.methanol.internal.spi
- com.github.mizosoft.methanol.internal.text - package com.github.mizosoft.methanol.internal.text
- com.github.mizosoft.methanol.internal.util - package com.github.mizosoft.methanol.internal.util
- commit(ByteBuffer) - Method in interface com.github.mizosoft.methanol.internal.cache.Store.Editor
-
Synchronous variant of
Store.Editor.commit(ByteBuffer, Executor). - commit(ByteBuffer, Executor) - Method in interface com.github.mizosoft.methanol.internal.cache.Store.Editor
-
Commits the changes made so far.
- Compare - Class in com.github.mizosoft.methanol.internal.util
- compatibleMediaTypes() - Method in class com.github.mizosoft.methanol.adapter.AbstractBodyAdapter
-
Returns an immutable set containing the media types this adapter is compatible with.
- complete() - Method in class com.github.mizosoft.methanol.internal.flow.AbstractQueueSubscription
- CONDITIONAL_HIT - Enum constant in enum com.github.mizosoft.methanol.CacheAwareResponse.CacheStatus
-
The response was constructed from cache but a conditional
GEThad to be made to validate it with the server. - conditionalize(HttpRequest) - Method in class com.github.mizosoft.methanol.internal.cache.CacheStrategy
- connectTimeout() - Method in class com.github.mizosoft.methanol.Methanol
- connectTimeout(Duration) - Method in class com.github.mizosoft.methanol.Methanol.Builder
- consumeCharIfPresent(char) - Method in class com.github.mizosoft.methanol.internal.text.HeaderValueTokenizer
- consumeCharsMatching(CharMatcher) - Method in class com.github.mizosoft.methanol.internal.text.HeaderValueTokenizer
- consumeDelimiter(char) - Method in class com.github.mizosoft.methanol.internal.text.HeaderValueTokenizer
- consumeDelimiter(char, boolean) - Method in class com.github.mizosoft.methanol.internal.text.HeaderValueTokenizer
- consumeIfPresent(String) - Method in class com.github.mizosoft.methanol.internal.text.HeaderValueTokenizer
- consumer(ThrowingConsumer) - Static method in class com.github.mizosoft.methanol.internal.function.Unchecked
- contentLength() - Method in class com.github.mizosoft.methanol.FormBodyPublisher
- contentLength() - Method in class com.github.mizosoft.methanol.internal.extensions.ByteBufferBodyPublisher
- contentLength() - Method in class com.github.mizosoft.methanol.internal.extensions.ForwardingBodyPublisher
- contentLength() - Method in class com.github.mizosoft.methanol.internal.extensions.SupplierBodyPublisher
- contentLength() - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher
- contentLength() - Method in interface com.github.mizosoft.methanol.ProgressTracker.Progress
-
Returns content length, or a value less than zero if unknown.
- contentLength() - Method in class com.github.mizosoft.methanol.WritableBodyPublisher
- cookieHandler() - Method in class com.github.mizosoft.methanol.Methanol
- cookieHandler(CookieHandler) - Method in class com.github.mizosoft.methanol.Methanol.Builder
- copy() - Method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a copy of this request that is independent of this instance.
- copy() - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
- copy(ByteBuffer) - Static method in class com.github.mizosoft.methanol.internal.Utils
- copyOf(HttpRequest) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestthat is a copy of the given request. - copyRemaining(ByteBuffer, ByteBuffer) - Static method in class com.github.mizosoft.methanol.internal.Utils
- create() - Static method in class com.github.mizosoft.methanol.internal.concurrent.CancellationPropagatingFuture
- create() - Static method in class com.github.mizosoft.methanol.Methanol
-
Creates a default
Methanolinstance. - create() - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequest. - create() - Static method in class com.github.mizosoft.methanol.ProgressTracker
-
Returns a default
ProgressTrackerwith no thresholds or executor. - create() - Static method in class com.github.mizosoft.methanol.ResponseBuilder
-
Returns a new
ResponseBuilder. - create() - Static method in class com.github.mizosoft.methanol.WritableBodyPublisher
-
Returns a new
WritableBodyPublisher. - create(int) - Static method in class com.github.mizosoft.methanol.WritableBodyPublisher
-
Returns a new
WritableBodyPublisherwith the given buffer size (number of bytes to buffer before making them available to the HTTP client). - create(String) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a default GET method. - create(HttpHeaders, HttpRequest.BodyPublisher) - Static method in class com.github.mizosoft.methanol.MultipartBodyPublisher.Part
-
Returns a new
Partwith the given headers and body publisher. - create(HttpResponse.BodySubscriber) - Method in interface com.github.mizosoft.methanol.BodyDecoder.Factory
-
Creates a
BodyDecoderwith the given downstream. - create(HttpResponse.BodySubscriber) - Method in class com.github.mizosoft.methanol.internal.decoder.DeflateBodyDecoderFactory
- create(HttpResponse.BodySubscriber) - Method in class com.github.mizosoft.methanol.internal.decoder.GzipBodyDecoderFactory
- create(HttpResponse.BodySubscriber, Executor) - Method in interface com.github.mizosoft.methanol.BodyDecoder.Factory
-
Creates a
BodyDecoderwith the given downstream and executor. - create(HttpResponse.BodySubscriber, Executor) - Method in class com.github.mizosoft.methanol.internal.decoder.DeflateBodyDecoderFactory
- create(HttpResponse.BodySubscriber, Executor) - Method in class com.github.mizosoft.methanol.internal.decoder.GzipBodyDecoderFactory
- create(URI) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a default GET method. - create(Function) - Static method in interface com.github.mizosoft.methanol.Methanol.Interceptor
-
Returns an interceptor that forwards the request after applying the given operator.
- createConcurrentPerUriRecorder() - Static method in interface com.github.mizosoft.methanol.HttpCache.StatsRecorder
-
Creates a
StatsRecorderthat atomically increments each count and records perURIstats. - createConcurrentRecorder() - Static method in interface com.github.mizosoft.methanol.HttpCache.StatsRecorder
-
Creates a
StatsRecorderthat atomically increments each count and doesn't record perURIstats. - createStore(Executor, int) - Method in interface com.github.mizosoft.methanol.internal.cache.InternalStorageExtension
- currentDemand() - Method in class com.github.mizosoft.methanol.internal.flow.AbstractSubscription
- currentSink() - Method in interface com.github.mizosoft.methanol.decoder.AsyncDecoder.ByteSink
-
Returns a
ByteBufferwith available space for writing the decompressed stream. - currentSource() - Method in interface com.github.mizosoft.methanol.decoder.AsyncDecoder.ByteSource
-
Returns a read-only
ByteBufferrepresenting the currently available chunk.
D
- dataSize() - Method in interface com.github.mizosoft.methanol.internal.cache.Store.Viewer
-
Returns the size in bytes of the data stream.
- deadline() - Method in interface com.github.mizosoft.methanol.RetryInterceptor.Context
-
Returns an
Optionalspecifying the deadline for retrying, specified according toRetryInterceptor.Builder.timeout(Duration). - debugIndexOps(boolean) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore.Builder
-
If set, the store complains when the index is accessed or modified either concurrently or not within the index executor.
- DebugUtils - Class in com.github.mizosoft.methanol.internal
- decode(AsyncDecoder.ByteSource, AsyncDecoder.ByteSink) - Method in interface com.github.mizosoft.methanol.decoder.AsyncDecoder
-
Processes whatever data available from the given source, writing decompressed bytes to the given sink.
- decode(ByteBuffer) - Static method in class com.github.mizosoft.methanol.internal.cache.CacheResponseMetadata
- decoder() - Static method in class com.github.mizosoft.methanol.internal.adapter.BasicAdapter
- decoder(BodyAdapter.Decoder) - Method in class com.github.mizosoft.methanol.AdapterCodec.Builder
-
Adds the given decoder.
- decoders() - Method in class com.github.mizosoft.methanol.AdapterCodec
-
Returns the list of decoders in this codec.
- decoding(HttpResponse.BodyHandler) - Static method in class com.github.mizosoft.methanol.MoreBodyHandlers
-
Returns a
BodyHandlerthat decompresses the response body for the given handler using aBodyDecoder. - decoding(HttpResponse.BodyHandler, Executor) - Static method in class com.github.mizosoft.methanol.MoreBodyHandlers
-
Returns a
BodyHandlerthat decompresses the response body for the given handler using aBodyDecoder. - defaultDelayer() - Static method in interface com.github.mizosoft.methanol.internal.concurrent.Delayer
-
A Delayer that uses a library-wide scheduler.
- defaultHeader(String, String) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Adds the given default header.
- defaultHeaders() - Method in class com.github.mizosoft.methanol.Methanol
-
Returns this client's default headers.
- defaultHeaders(String...) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Adds each of the given default headers.
- defaultHeaders(Consumer) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Configures the default headers as specified by the given consumer.
- DefaultProvider - Annotation Type in com.github.mizosoft.methanol.internal.annotations
-
Identifies a provider from this module as default so that it can be overridden by user providers with same characteristics.
- deferredHandlerOf(TypeRef, BodyAdapter.Hints) - Method in class com.github.mizosoft.methanol.AdapterCodec
-
Returns a
BodyHandlerthat lazily decodes the response body into an object of the given type. - deferredSubscriberOf(TypeRef, BodyAdapter.Hints) - Method in class com.github.mizosoft.methanol.AdapterCodec
-
Returns a
HttpResponse.BodySubscriberthat lazily decodes the response body into an object of the given type. - DeflateBodyDecoderFactory - Class in com.github.mizosoft.methanol.internal.decoder
-
BodyDecoder.Factoryfor "deflate". - DeflateBodyDecoderFactory() - Constructor for class com.github.mizosoft.methanol.internal.decoder.DeflateBodyDecoderFactory
-
Creates a new
DeflateBodyDecoderFactory. - delay(Runnable, Duration, Executor) - Method in interface com.github.mizosoft.methanol.internal.concurrent.Delayer
-
Arranges for the task to be submitted to the given executor after the delay is evaluated.
- delayer(Delayer) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore.Builder
- Delayer - Interface in com.github.mizosoft.methanol.internal.concurrent
-
Delays the execution of a given task.
- delegate() - Method in class com.github.mizosoft.methanol.adapter.ForwardingBodyAdapter
-
Returns the adapter calls are being forwarded to.
- delegate() - Method in class com.github.mizosoft.methanol.adapter.ForwardingDecoder
- delegate() - Method in class com.github.mizosoft.methanol.adapter.ForwardingEncoder
- delegate() - Method in class com.github.mizosoft.methanol.internal.extensions.AsyncSubscriberAdapter
- delegate() - Method in class com.github.mizosoft.methanol.internal.extensions.ForwardingBodyPublisher
- delegate() - Method in class com.github.mizosoft.methanol.internal.extensions.ForwardingBodySubscriber
- delegate() - Method in class com.github.mizosoft.methanol.internal.flow.ForwardingSubscriber
-
Returns the downstream to which signals are forwarded.
- delegate() - Method in class com.github.mizosoft.methanol.internal.flow.TimeoutSubscriber
- DELETE() - Method in class com.github.mizosoft.methanol.MutableRequest
- DELETE() - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
- DELETE(String) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a DELETE method. - DELETE(URI) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a DELETE method. - determinate() - Method in interface com.github.mizosoft.methanol.ProgressTracker.Progress
-
Returns
trueif this progress is determinate (i.e. - digits() - Static method in interface com.github.mizosoft.methanol.internal.text.CharMatcher
- directive(String) - Method in class com.github.mizosoft.methanol.CacheControl.Builder
-
Sets the given directive with no argument.
- directive(String, String) - Method in class com.github.mizosoft.methanol.CacheControl.Builder
-
Sets the given directive to the given argument.
- directives() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns a map of all directives and their arguments.
- directory() - Method in class com.github.mizosoft.methanol.HttpCache
-
Returns the directory used by this cache if entries are being cached on disk.
- directory() - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- directory(Path) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore.Builder
- disabled() - Static method in interface com.github.mizosoft.methanol.HttpCache.StatsRecorder
-
Returns a disabled
StatsRecorder. - disabled() - Static method in interface com.github.mizosoft.methanol.internal.cache.CacheReadingPublisher.Listener
- disabled() - Static method in interface com.github.mizosoft.methanol.internal.cache.CacheWritingPublisher.Listener
- discard(Executor) - Method in class com.github.mizosoft.methanol.internal.cache.NetworkResponse
-
Discards the response body in background.
- DiskStore - Class in com.github.mizosoft.methanol.internal.cache
-
A persistent
Storeimplementation that saves entries on disk under a specified directory. - DiskStore.Builder - Class in com.github.mizosoft.methanol.internal.cache
- DiskStore.Hash - Class in com.github.mizosoft.methanol.internal.cache
-
An immutable 80-bit hash code.
- DiskStore.Hasher - Interface in com.github.mizosoft.methanol.internal.cache
-
A function that computes an 80-bit hash from a string key.
- dispose() - Method in class com.github.mizosoft.methanol.HttpCache
-
Atomically clears and closes this cache.
- dispose() - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- dispose() - Method in class com.github.mizosoft.methanol.internal.cache.MemoryStore
- dispose() - Method in interface com.github.mizosoft.methanol.internal.cache.Store
-
Atomically clears and closes this store.
- done() - Method in interface com.github.mizosoft.methanol.ProgressTracker.Progress
-
Returns
trueif the upload or download operation is done. - downstream() - Method in interface com.github.mizosoft.methanol.BodyDecoder
-
Returns this decoder's downstream.
- downstream() - Method in class com.github.mizosoft.methanol.decoder.AsyncBodyDecoder
- dropBody() - Method in class com.github.mizosoft.methanol.ResponseBuilder
E
- edit() - Method in class com.github.mizosoft.methanol.internal.cache.CacheResponse
- edit() - Method in interface com.github.mizosoft.methanol.internal.cache.Store.Viewer
-
Synchronous variant of
Store.Viewer.edit(Executor). - edit(String) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- edit(String) - Method in class com.github.mizosoft.methanol.internal.cache.MemoryStore
- edit(String) - Method in interface com.github.mizosoft.methanol.internal.cache.Store
-
Synchronous variant of
Store.edit(String, Executor). - edit(String, Executor) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- edit(String, Executor) - Method in class com.github.mizosoft.methanol.internal.cache.MemoryStore
- edit(String, Executor) - Method in interface com.github.mizosoft.methanol.internal.cache.Store
-
Opens an editor for the entry associated with the given key.
- edit(Executor) - Method in interface com.github.mizosoft.methanol.internal.cache.Store.Viewer
-
Opens an editor for the entry this viewer was opened for.
- emit(Flow.Subscriber, long) - Method in class com.github.mizosoft.methanol.internal.flow.AbstractPollableSubscription
- emit(Flow.Subscriber, long) - Method in class com.github.mizosoft.methanol.internal.flow.AbstractSubscription
-
Emits at most
emititems to downstream usingAbstractSubscription.submitOnNext(Subscriber, Object)as long as it returnstrue. - empty() - Static method in interface com.github.mizosoft.methanol.BodyAdapter.Hints
-
Returns a
Hintsobject containing no hints. - empty() - Static method in class com.github.mizosoft.methanol.CacheControl
-
Returns a
CacheControlwith no directives. - empty() - Static method in interface com.github.mizosoft.methanol.HttpCache.Stats
-
Returns a
Statswith zero counters. - emptyPublisher() - Static method in class com.github.mizosoft.methanol.internal.flow.FlowSupport
- enable(boolean) - Method in class com.github.mizosoft.methanol.HttpCache
-
Sets whether this cache is enabled.
- enclosedProgress() - Method in class com.github.mizosoft.methanol.ProgressTracker
-
Returns whether the sequence of progress events is enclosed between
0%and100%progress events. - enclosedProgress(boolean) - Method in class com.github.mizosoft.methanol.ProgressTracker.Builder
-
If set to
true(default), the sequence of progress events will be enclosed between0%and100%progresses to detect begin and completion events respectively. - encode() - Method in class com.github.mizosoft.methanol.internal.cache.CacheResponseMetadata
- encodedString() - Method in class com.github.mizosoft.methanol.FormBodyPublisher
-
Returns the url-encoded string of this body's queries.
- encoder() - Static method in class com.github.mizosoft.methanol.internal.adapter.BasicAdapter
- encoder(BodyAdapter.Encoder) - Method in class com.github.mizosoft.methanol.AdapterCodec.Builder
-
Adds the given encoder.
- encoders() - Method in class com.github.mizosoft.methanol.AdapterCodec
-
Returns the list of encoders in this codec.
- encoding() - Method in interface com.github.mizosoft.methanol.BodyDecoder
-
Returns the encoding used by this decoder.
- encoding() - Method in interface com.github.mizosoft.methanol.BodyDecoder.Factory
-
Returns the encoding used by
BodyDecoderscreated by this factory. - encoding() - Method in class com.github.mizosoft.methanol.decoder.AsyncBodyDecoder
- encoding() - Method in interface com.github.mizosoft.methanol.decoder.AsyncDecoder
-
Returns this decoder's encoding.
- encoding() - Method in class com.github.mizosoft.methanol.internal.decoder.DeflateBodyDecoderFactory
- encoding() - Method in class com.github.mizosoft.methanol.internal.decoder.GzipBodyDecoderFactory
- entriesOnUnderlyingStorageForTesting(String) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- entriesOnUnderlyingStorageForTesting(String) - Method in interface com.github.mizosoft.methanol.internal.cache.TestableStore
-
Returns string representations for the resources an entry with the given key occupies on the underlying store.
- entrySize() - Method in interface com.github.mizosoft.methanol.internal.cache.Store.Viewer
-
Returns the size in bytes of the metadata block and data stream.
- equals(Object) - Method in class com.github.mizosoft.methanol.CacheControl
- equals(Object) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore.Hash
- equals(Object) - Method in class com.github.mizosoft.methanol.MediaType
-
Tests the given object for equality with this instance.
- equals(Object) - Method in class com.github.mizosoft.methanol.TypeRef
-
Returns
trueif the given object is aTypeRefand both instances represent the same type. - equals(Object) - Method in interface com.github.mizosoft.methanol.BodyAdapter.Hints
- escapeAndQuoteValueIfNeeded(String) - Static method in class com.github.mizosoft.methanol.internal.Utils
-
From RFC 7230 section 3.2.6:
- exactRawType() - Method in class com.github.mizosoft.methanol.TypeRef
-
Returns the underlying type as a
Class<T>for when it is known thatTis a raw type. - Example: - Section in class com.github.mizosoft.methanol.RetryInterceptor
- exception() - Method in interface com.github.mizosoft.methanol.RetryInterceptor.Context
-
Returns the resulting exception.
- exchange(HttpRequest, HttpResponse.BodyHandler) - Method in class com.github.mizosoft.methanol.Methanol
-
Returns a
Publisherfor theHttpResponse<T>resulting from asynchronously sending the given request. - exchange(HttpRequest, HttpResponse.BodyHandler, Function) - Method in class com.github.mizosoft.methanol.Methanol
-
Returns a
Publisherfor the sequence ofHttpResponse<T>resulting from asynchronously sending the given request along with accepting incomingpush promisesusing the givenFunction. - execute(Runnable) - Method in class com.github.mizosoft.methanol.internal.concurrent.SerialExecutor
- executor() - Method in interface com.github.mizosoft.methanol.BodyDecoder
-
Returns this decoder's executor if one is specified.
- executor() - Method in class com.github.mizosoft.methanol.decoder.AsyncBodyDecoder
- executor() - Method in class com.github.mizosoft.methanol.HttpCache
-
Returns an
Optionalcontaining this cache's executor if one is explicitly set. - executor() - Static method in class com.github.mizosoft.methanol.internal.concurrent.SharedExecutors
- executor() - Method in class com.github.mizosoft.methanol.Methanol
- executor() - Method in class com.github.mizosoft.methanol.ProgressTracker
-
Returns the optional executor on which
ProgressTracker.Listenermethods are called. - executor(Executor) - Method in class com.github.mizosoft.methanol.HttpCache.Builder
-
Sets the executor to be used by the cache.
- executor(Executor) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore.Builder
- executor(Executor) - Method in class com.github.mizosoft.methanol.Methanol.Builder
- executor(Executor) - Method in class com.github.mizosoft.methanol.ProgressTracker.Builder
-
Sets the executor on which
ProgressTracker.Listenermethods are called. - expectContinue() - Method in class com.github.mizosoft.methanol.MutableRequest
- expectContinue(boolean) - Method in class com.github.mizosoft.methanol.MutableRequest
- expectContinue(boolean) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
- exponential(Duration, Duration) - Static method in interface com.github.mizosoft.methanol.RetryInterceptor.BackoffStrategy
-
Returns a
BackoffStrategythat applies an exponentially (base 2) increasing delay every retry, wherebasespecifies the first delay, andcapspecifies the maximum delay.
F
- factories() - Static method in class com.github.mizosoft.methanol.internal.spi.BodyDecoderFactoryProviders
- FIELD_VALUE_MATCHER - Static variable in class com.github.mizosoft.methanol.internal.text.HttpCharMatchers
- FileIO - Class in com.github.mizosoft.methanol.internal.cache
-
Read/Write utilities that make sure exactly the requested bytes are read/written.
- filePart(String, Path) - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher.Builder
-
Adds a file form field with the given name and file.
- filePart(String, Path, MediaType) - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher.Builder
-
Adds a file form field with given name, file and media type.
- finalSource() - Method in interface com.github.mizosoft.methanol.decoder.AsyncDecoder.ByteSource
-
Returns true if this source is final and no more decode operations are to be expected.
- fireOrKeepAlive() - Method in class com.github.mizosoft.methanol.internal.flow.AbstractSubscription
- fireOrKeepAliveOnError(Throwable) - Method in class com.github.mizosoft.methanol.internal.flow.AbstractSubscription
- fireOrKeepAliveOnNext() - Method in class com.github.mizosoft.methanol.internal.flow.AbstractSubscription
- firstQuery(String) - Method in class com.github.mizosoft.methanol.FormBodyPublisher
-
Returns the first value of the query associated with the given key.
- fixed(Duration) - Static method in interface com.github.mizosoft.methanol.RetryInterceptor.BackoffStrategy
-
Returns a
BackoffStrategythat applies a fixed delay every retry. - FlowSupport - Class in com.github.mizosoft.methanol.internal.flow
-
Helpers for implementing reactive streams subscriptions and the like.
- flush() - Method in class com.github.mizosoft.methanol.HttpCache
- flush() - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- flush() - Method in class com.github.mizosoft.methanol.internal.cache.MemoryStore
- flush() - Method in interface com.github.mizosoft.methanol.internal.cache.Store
-
Flushes any indexing data buffered by this store.
- flush() - Method in class com.github.mizosoft.methanol.WritableBodyPublisher
-
Makes any buffered content available for consumption by downstream.
- followRedirects() - Method in class com.github.mizosoft.methanol.Methanol
- followRedirects(HttpClient.Redirect) - Method in class com.github.mizosoft.methanol.Methanol.Builder
- forDecoder(HttpResponse.ResponseInfo) - Method in class com.github.mizosoft.methanol.BodyAdapter.Hints.Builder
-
Adds the given
ResponseInfoas a hint and a media type hint extracted from the response headers if present. - forEncoder(HttpRequest) - Method in class com.github.mizosoft.methanol.BodyAdapter.Hints.Builder
-
Adds the given request as a hint and a media type hint extracted from either the request's body or
Content-Typeheader, whichever is present first. - formatHttpDate(LocalDateTime) - Static method in class com.github.mizosoft.methanol.internal.cache.HttpDates
- FormBodyPublisher - Class in com.github.mizosoft.methanol
-
A
BodyPublisherfor form submission using theapplication/x-www-form-urlencodedrequest type. - FormBodyPublisher.Builder - Class in com.github.mizosoft.methanol
-
A builder of
FormBodyPublisherinstances. - formPart(String, String, HttpRequest.BodyPublisher) - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher.Builder
-
Adds a form field with the given name, filename and body.
- formPart(String, String, HttpRequest.BodyPublisher, MediaType) - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher.Builder
-
Adds a form field with the given name, filename, body and media type.
- formPart(String, HttpRequest.BodyPublisher) - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher.Builder
-
Adds a form field with the given name and body.
- forward(HttpRequest) - Method in interface com.github.mizosoft.methanol.Methanol.Interceptor.Chain
-
Forwards the request to the next interceptor or to the client's backend if called by the last interceptor.
- forwardAsync(HttpRequest) - Method in interface com.github.mizosoft.methanol.Methanol.Interceptor.Chain
-
Forwards the request to the next interceptor, or asynchronously to the client's backend if called by the last interceptor.
- ForwardingBodyAdapter - Class in com.github.mizosoft.methanol.adapter
-
A
BodyAdapterthat forwards calls to another. - ForwardingBodyAdapter() - Constructor for class com.github.mizosoft.methanol.adapter.ForwardingBodyAdapter
- ForwardingBodyPublisher - Class in com.github.mizosoft.methanol.internal.extensions
- ForwardingBodyPublisher(HttpRequest.BodyPublisher) - Constructor for class com.github.mizosoft.methanol.internal.extensions.ForwardingBodyPublisher
- ForwardingBodySubscriber<T> - Class in com.github.mizosoft.methanol.internal.extensions
- ForwardingBodySubscriber(HttpResponse.BodySubscriber) - Constructor for class com.github.mizosoft.methanol.internal.extensions.ForwardingBodySubscriber
- ForwardingDecoder - Class in com.github.mizosoft.methanol.adapter
-
A
BodyAdapter.Decoderthat forwards calls to another. - ForwardingDecoder(BodyAdapter.Decoder) - Constructor for class com.github.mizosoft.methanol.adapter.ForwardingDecoder
- ForwardingEncoder - Class in com.github.mizosoft.methanol.adapter
-
An
BodyAdapter.Encoderthat forwards calls to another. - ForwardingEncoder(BodyAdapter.Encoder) - Constructor for class com.github.mizosoft.methanol.adapter.ForwardingEncoder
- forwardingObjectToString(Object, Object) - Static method in class com.github.mizosoft.methanol.internal.Utils
- ForwardingSubscriber<T> - Class in com.github.mizosoft.methanol.internal.flow
-
A
Subscriber<T>that forwards to a downstreamSubscriber<? super T>. - ForwardingSubscriber() - Constructor for class com.github.mizosoft.methanol.internal.flow.ForwardingSubscriber
- from(TrackedResponse) - Static method in class com.github.mizosoft.methanol.internal.cache.CacheResponseMetadata
- from(Class) - Static method in class com.github.mizosoft.methanol.TypeRef
-
Deprecated.
- from(Type) - Static method in class com.github.mizosoft.methanol.TypeRef
-
Deprecated.in favor of
TypeRef.of(Type). - from(HttpRequest) - Static method in class com.github.mizosoft.methanol.TaggableRequest
-
Returns either the given request if it's a
TaggableRequestor a newTaggableRequestcopy with no tags otherwise. - from(HttpResponse) - Static method in class com.github.mizosoft.methanol.internal.extensions.ImmutableResponseInfo
- from(HttpResponse) - Static method in class com.github.mizosoft.methanol.ResponseBuilder
-
Returns a new
ResponseBuilderthat copies the given response's state. - fromAsyncSubscriber(S, Function) - Static method in class com.github.mizosoft.methanol.MoreBodyHandlers
-
Returns a
BodyHandlerthat returns a subscriber obtained fromMoreBodySubscribers.fromAsyncSubscriber(Subscriber, Function). - fromAsyncSubscriber(S, Function) - Static method in class com.github.mizosoft.methanol.MoreBodySubscribers
-
Returns a
BodySubscriberthat forwards the response body to the given downstream. - func(ThrowingFunction) - Static method in class com.github.mizosoft.methanol.internal.function.Unchecked
G
- get() - Method in class com.github.mizosoft.methanol.internal.adapter.PayloadHandlerExecutor
- get() - Method in class com.github.mizosoft.methanol.internal.cache.RawResponse
- get() - Method in class com.github.mizosoft.methanol.internal.concurrent.Lazy
- get() - Method in class com.github.mizosoft.methanol.internal.flow.Upstream
- get() - Method in interface com.github.mizosoft.methanol.internal.function.ThrowingSupplier
- get() - Method in class com.github.mizosoft.methanol.internal.spi.ServiceProviders
- get(Class) - Method in interface com.github.mizosoft.methanol.BodyAdapter.Hints
-
Returns the hint mapped to by the given type.
- get(HttpRequest) - Method in interface com.github.mizosoft.methanol.internal.cache.LocalCache
- get(Future) - Static method in class com.github.mizosoft.methanol.internal.Utils
- GET() - Method in class com.github.mizosoft.methanol.MutableRequest
- GET() - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
- GET(String) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a GET method. - GET(URI) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a GET method. - getAndAddDemand(Object, VarHandle, long) - Static method in class com.github.mizosoft.methanol.internal.flow.FlowSupport
-
Adds the given count to demand, making sure it doesn't exceed
Long.MAX_VALUE. - getBody() - Method in interface com.github.mizosoft.methanol.BodyDecoder
-
Returns the body's
CompletionStage. - getBody() - Method in class com.github.mizosoft.methanol.internal.extensions.AsyncSubscriberAdapter
- getBody() - Method in class com.github.mizosoft.methanol.internal.extensions.ByteChannelBodySubscriber
- getBody() - Method in class com.github.mizosoft.methanol.internal.extensions.ForwardingBodySubscriber
- getBody() - Method in class com.github.mizosoft.methanol.internal.extensions.PublisherBodySubscriber
- getBody() - Method in class com.github.mizosoft.methanol.internal.extensions.TimeoutBodySubscriber
- getCharacter() - Method in class com.github.mizosoft.methanol.internal.text.HeaderValueTokenizer
- getDecoder(TypeRef, MediaType) - Static method in interface com.github.mizosoft.methanol.BodyAdapter.Decoder
-
Returns a registered decoder that supports the given object type and media type, if any.
- getDeepCompletionCause(Throwable) - Static method in class com.github.mizosoft.methanol.internal.Utils
- getEncoder(TypeRef, MediaType) - Static method in interface com.github.mizosoft.methanol.BodyAdapter.Encoder
-
Returns a registered encoder that supports the given object type and media type, if any.
- getFactory(String) - Static method in interface com.github.mizosoft.methanol.BodyDecoder.Factory
-
Returns the factory registered for the given encoding, if any.
- getIo(Future) - Static method in class com.github.mizosoft.methanol.internal.Utils
- guarded() - Method in interface com.github.mizosoft.methanol.internal.cache.CacheReadingPublisher.Listener
- guarded() - Method in interface com.github.mizosoft.methanol.internal.cache.CacheWritingPublisher.Listener
- GzipBodyDecoderFactory - Class in com.github.mizosoft.methanol.internal.decoder
-
BodyDecoder.Factoryfor "gzip". - GzipBodyDecoderFactory() - Constructor for class com.github.mizosoft.methanol.internal.decoder.GzipBodyDecoderFactory
-
Creates a new
GzipBodyDecoderFactory.
H
- handle(HttpResponse.BodyHandler) - Method in class com.github.mizosoft.methanol.internal.cache.RawResponse
- handleAsync(HttpResponse.BodyHandler, Executor) - Method in class com.github.mizosoft.methanol.internal.cache.CacheResponse
- handleAsync(HttpResponse.BodyHandler, Executor) - Method in class com.github.mizosoft.methanol.internal.cache.NetworkResponse
- handleAsync(HttpResponse.BodyHandler, Executor) - Method in class com.github.mizosoft.methanol.internal.cache.RawResponse
- handleAsync(HttpResponse.ResponseInfo, Flow.Publisher, HttpResponse.BodyHandler, Executor) - Static method in class com.github.mizosoft.methanol.internal.extensions.Handlers
- handleAsync(HttpResponse, Flow.Publisher, HttpResponse.BodyHandler, Executor) - Static method in class com.github.mizosoft.methanol.internal.extensions.Handlers
- handleAsync(HttpResponse, HttpResponse.BodyHandler, Executor) - Static method in class com.github.mizosoft.methanol.internal.extensions.Handlers
- handlerOf(TypeRef, BodyAdapter.Hints) - Method in class com.github.mizosoft.methanol.AdapterCodec
-
Returns a
HttpResponse.BodyHandlerthat decodes the response body into an object of the given type. - Handlers - Class in com.github.mizosoft.methanol.internal.extensions
-
Static functions for converting the response body into a usable body type.
- handleWith(HttpResponse.BodyHandler) - Method in interface com.github.mizosoft.methanol.ResponsePayload
-
Converts this payload using the given body handler.
- handleWithAsync(HttpResponse.BodyHandler) - Method in interface com.github.mizosoft.methanol.ResponsePayload
-
Asynchronously converts this payload using the given body handler.
- hash(String) - Method in interface com.github.mizosoft.methanol.internal.cache.DiskStore.Hasher
- Hash(ByteBuffer) - Constructor for class com.github.mizosoft.methanol.internal.cache.DiskStore.Hash
- hashCode() - Method in interface com.github.mizosoft.methanol.BodyAdapter.Hints
- hashCode() - Method in class com.github.mizosoft.methanol.CacheControl
- hashCode() - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore.Hash
- hashCode() - Method in class com.github.mizosoft.methanol.MediaType
-
Returns a hashcode for this media type.
- hashCode() - Method in class com.github.mizosoft.methanol.TypeRef
- hasher(DiskStore.Hasher) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore.Builder
- hasPendingErrors() - Method in class com.github.mizosoft.methanol.internal.flow.AbstractSubscription
-
Returns
trueif the subscriber is to be completed exceptionally. - hasRemaining() - Method in interface com.github.mizosoft.methanol.decoder.AsyncDecoder.ByteSource
-
Returns
trueif this source has remaining bytes. - hasRemaining() - Method in class com.github.mizosoft.methanol.internal.text.HeaderValueTokenizer
- hasWildcard() - Method in class com.github.mizosoft.methanol.MediaType
-
Returns
trueif this media type is*/*or if it has a wildcard subtype. - HEAD() - Method in class com.github.mizosoft.methanol.MutableRequest
- HEAD(String) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a HEAD method. - HEAD(URI) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a HEAD method. - header(String, String) - Method in interface com.github.mizosoft.methanol.HeadersAccumulator
-
Adds the given header name-value pair.
- header(String, String) - Method in class com.github.mizosoft.methanol.MutableRequest
- header(String, String) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- header(String, String) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
- headers() - Method in class com.github.mizosoft.methanol.internal.extensions.ImmutableResponseInfo
- headers() - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher.Part
-
Returns this part's headers.
- headers() - Method in class com.github.mizosoft.methanol.MutableRequest
- headers(String...) - Method in interface com.github.mizosoft.methanol.HeadersAccumulator
-
Adds each of the given header name-value pairs.
- headers(String...) - Method in class com.github.mizosoft.methanol.MutableRequest
- headers(String...) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- headers(String...) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
- headers(HttpHeaders) - Method in interface com.github.mizosoft.methanol.HeadersAccumulator
-
Adds all the given headers.
- headers(HttpHeaders) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Adds each of the given
HttpHeaders. - headers(HttpHeaders) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- HeadersAccumulator<T> - Interface in com.github.mizosoft.methanol
-
An accumulator of header name-value pairs.
- HeadersBuilder - Class in com.github.mizosoft.methanol.internal.extensions
- HeadersBuilder() - Constructor for class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- headersTimeout() - Method in class com.github.mizosoft.methanol.Methanol
-
Returns the headers timeout.
- headersTimeout(Duration) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Sets a timeout that will raise an
HttpHeadersTimeoutExceptionif all response headers aren't received within the timeout. - headersTimeout(Duration, ScheduledExecutorService) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Same as
Methanol.BaseBuilder.headersTimeout(Duration)but specifies aScheduledExecutorServiceto use for scheduling timeout events. - HeaderValueTokenizer - Class in com.github.mizosoft.methanol.internal.text
-
Tokenizes delimited header values into individual components.
- HeaderValueTokenizer(String) - Constructor for class com.github.mizosoft.methanol.internal.text.HeaderValueTokenizer
- hint(Class, T) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Adds the given value to this request's
BodyAdapter.Hints. - hints() - Method in class com.github.mizosoft.methanol.MutableRequest
- hints() - Method in class com.github.mizosoft.methanol.TaggableRequest
-
Returns this request's
BodyAdapter.Hints. - hints(Consumer) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Modifies this request's
BodyAdapter.Hintsby mutating aBodyAdapter.Hints.Builder. - hintsOf(MediaType) - Static method in class com.github.mizosoft.methanol.internal.Utils
- HIT - Enum constant in enum com.github.mizosoft.methanol.CacheAwareResponse.CacheStatus
-
The response was entirely constructed from cache and no network was used.
- hitCount() - Method in interface com.github.mizosoft.methanol.HttpCache.Stats
-
Returns the number of requests resulting in a cache hit, including conditional hits.
- hitRate() - Method in interface com.github.mizosoft.methanol.HttpCache.Stats
-
Returns a value between
0.0and1.0representing the ratio between the hit and request counts. - Http - Class in com.github.mizosoft.methanol.internal.util
- HttpCache - Class in com.github.mizosoft.methanol
- HttpCache.Builder - Class in com.github.mizosoft.methanol
-
A builder of
HttpCaches. - HttpCache.Listener - Interface in com.github.mizosoft.methanol
-
A listener to request/response & read/write events within the cache.
- HttpCache.Stats - Interface in com.github.mizosoft.methanol
-
Statistics of an
HttpCache. - HttpCache.StatsRecorder - Interface in com.github.mizosoft.methanol
-
Strategy for recoding
HttpCachestatistics. - HttpCharMatchers - Class in com.github.mizosoft.methanol.internal.text
-
Common
CharMatchersfor HTTP headers and the like. - HttpDates - Class in com.github.mizosoft.methanol.internal.cache
-
Helpers for parsing/formatting HTTP dates.
- HttpHeadersTimeoutException - Exception Class in com.github.mizosoft.methanol
-
Thrown when all response headers aren't received within a timeout.
- HttpHeadersTimeoutException(String) - Constructor for exception class com.github.mizosoft.methanol.HttpHeadersTimeoutException
-
Creates a new
HttpHeadersTimeoutExceptionwith the given message. - HttpReadTimeoutException - Exception Class in com.github.mizosoft.methanol
-
Thrown when a body subscriber doesn't receive a requested signal within a timeout.
- HttpReadTimeoutException(String) - Constructor for exception class com.github.mizosoft.methanol.HttpReadTimeoutException
-
Creates a new
HttpReadTimeoutException. - HttpResponsePublisher<T> - Class in com.github.mizosoft.methanol.internal.extensions
-
A publisher of
responsesresulting from sending a given request and optionally accepting incoming push promises, if any. - HttpResponsePublisher(HttpClient, HttpRequest, HttpResponse.BodyHandler, Function, Executor) - Constructor for class com.github.mizosoft.methanol.internal.extensions.HttpResponsePublisher
-
Creates a new
HttpResponsePublisher. - HttpRetriesExhaustedException - Exception Class in com.github.mizosoft.methanol
-
Thrown when a
RetryInterceptorexhausts maximum retries. - HttpRetriesExhaustedException(String) - Constructor for exception class com.github.mizosoft.methanol.HttpRetriesExhaustedException
-
Creates a new
HttpRetryTimeoutException. - HttpStatus - Class in com.github.mizosoft.methanol
-
Static functions for checking response status codes.
I
- IMAGE_ANY - Static variable in class com.github.mizosoft.methanol.MediaType
-
image/* - IMAGE_GIF - Static variable in class com.github.mizosoft.methanol.MediaType
-
image/gif - IMAGE_JPEG - Static variable in class com.github.mizosoft.methanol.MediaType
-
image/jpeg - IMAGE_PNG - Static variable in class com.github.mizosoft.methanol.MediaType
-
image/png - ImmutableResponseInfo - Class in com.github.mizosoft.methanol.internal.extensions
-
Implementation of
ResponseInfo. - ImmutableResponseInfo(int, HttpHeaders, HttpClient.Version) - Constructor for class com.github.mizosoft.methanol.internal.extensions.ImmutableResponseInfo
- includes(MediaType) - Method in class com.github.mizosoft.methanol.MediaType
-
Returns whether this media type includes the given one.
- indexUpdateDelay(Duration) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore.Builder
- initialize() - Method in class com.github.mizosoft.methanol.HttpCache
-
Deprecated, for removal: This API element is subject to removal in a future version.As of
1.8.0, a cache is always initialized when created. - initialize(Upstream) - Method in class com.github.mizosoft.methanol.internal.flow.Prefetcher
- initializeAsync() - Method in class com.github.mizosoft.methanol.HttpCache
-
Deprecated, for removal: This API element is subject to removal in a future version.As of
1.8.0, a cache is always initialized when created. - inMemory(long) - Static method in interface com.github.mizosoft.methanol.StorageExtension
-
Returns a
StorageExtensionfor saving data in memory, not exceeding the given size. - installed() - Static method in class com.github.mizosoft.methanol.AdapterCodec
- installed() - Static method in interface com.github.mizosoft.methanol.BodyAdapter.Decoder
-
Returns an immutable list containing the installed decoders.
- installed() - Static method in interface com.github.mizosoft.methanol.BodyAdapter.Encoder
-
Returns an immutable list containing the installed encoders.
- installedBindings() - Static method in interface com.github.mizosoft.methanol.BodyDecoder.Factory
-
Returns an immutable map that case-insensitively maps encodings to their corresponding registered factories.
- installedFactories() - Static method in interface com.github.mizosoft.methanol.BodyDecoder.Factory
-
Returns an immutable list of the registered factories.
- instance(boolean) - Method in interface com.github.mizosoft.methanol.internal.cache.LocalCache.Factory
- intercept(HttpRequest, Methanol.Interceptor.Chain) - Method in class com.github.mizosoft.methanol.internal.cache.CacheInterceptor
- intercept(HttpRequest, Methanol.Interceptor.Chain) - Method in class com.github.mizosoft.methanol.internal.cache.RedirectingInterceptor
- intercept(HttpRequest, Methanol.Interceptor.Chain) - Method in interface com.github.mizosoft.methanol.Methanol.Interceptor
-
Intercepts given request and returns the resulting response, usually by forwarding to the given chain.
- intercept(HttpRequest, Methanol.Interceptor.Chain) - Method in class com.github.mizosoft.methanol.RetryInterceptor
- interceptAsync(HttpRequest, Methanol.Interceptor.Chain) - Method in class com.github.mizosoft.methanol.internal.cache.CacheInterceptor
- interceptAsync(HttpRequest, Methanol.Interceptor.Chain) - Method in class com.github.mizosoft.methanol.internal.cache.RedirectingInterceptor
- interceptAsync(HttpRequest, Methanol.Interceptor.Chain) - Method in interface com.github.mizosoft.methanol.Methanol.Interceptor
-
Intercepts the given request and returns a
CompletableFuturefor the resulting response, usually by forwarding to the given chain. - interceptAsync(HttpRequest, Methanol.Interceptor.Chain) - Method in class com.github.mizosoft.methanol.RetryInterceptor
- interceptor(Methanol.Interceptor) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Adds an interceptor that is invoked right after the client receives a request.
- interceptors() - Method in class com.github.mizosoft.methanol.Methanol
-
Returns an immutable list of this client's
interceptors. - InternalStorageExtension - Interface in com.github.mizosoft.methanol.internal.cache
- is(int) - Static method in interface com.github.mizosoft.methanol.internal.text.CharMatcher
- is(MediaType) - Method in interface com.github.mizosoft.methanol.ResponsePayload
-
Returns true if this payload has the given media type.
- isAnyOf(MediaType...) - Method in interface com.github.mizosoft.methanol.ResponsePayload
-
Returns true if this payload has any of the given media types.
- isAssertionsEnabled() - Static method in class com.github.mizosoft.methanol.internal.DebugUtils
- isCacheResponseServable() - Method in class com.github.mizosoft.methanol.internal.cache.CacheStrategy
- isCacheResponseServableOnError() - Method in class com.github.mizosoft.methanol.internal.cache.CacheStrategy
- isCacheUpdating() - Method in class com.github.mizosoft.methanol.internal.cache.NetworkResponse
- isCancelled() - Method in class com.github.mizosoft.methanol.internal.flow.AbstractSubscription
-
Returns
trueif this subscription is cancelled. - isCancelled() - Method in class com.github.mizosoft.methanol.internal.flow.Upstream
- isClientError(int) - Static method in class com.github.mizosoft.methanol.HttpStatus
-
Returns
trueifstatusCodeis a 4xx client error status code. - isClientError(HttpResponse) - Static method in class com.github.mizosoft.methanol.HttpStatus
-
Returns
trueifresponse.statusCode()is a 4xx client error status code. - isClosed() - Method in class com.github.mizosoft.methanol.WritableBodyPublisher
-
Returns
trueif this publisher is closed by eitherWritableBodyPublisher.close()orWritableBodyPublisher.closeExceptionally(Throwable). - isCompatibleWith(MediaType) - Method in class com.github.mizosoft.methanol.adapter.AbstractBodyAdapter
- isCompatibleWith(MediaType) - Method in class com.github.mizosoft.methanol.adapter.ForwardingBodyAdapter
- isCompatibleWith(MediaType) - Method in interface com.github.mizosoft.methanol.BodyAdapter
-
Returns
trueif the format this adapter uses iscompatiblewith the given media type. - isCompatibleWith(MediaType) - Method in class com.github.mizosoft.methanol.MediaType
-
Returns whether this media type is compatible with the given one.
- isComplete() - Method in class com.github.mizosoft.methanol.internal.flow.AbstractPollableSubscription
-
Returns
trueif downstream is to be completed. - isComplete() - Method in class com.github.mizosoft.methanol.internal.flow.AbstractQueueSubscription
- isEnabled() - Method in class com.github.mizosoft.methanol.HttpCache
-
Returns whether this cache is
enabled. - isGenericArray() - Method in class com.github.mizosoft.methanol.TypeRef
- isHeuristicallyCacheable(int) - Static method in class com.github.mizosoft.methanol.internal.util.Http
-
Returns whether a response with the given code can be cached based on heuristic expiry in case explicit expiry is absent.
- isHttpDate(String) - Static method in class com.github.mizosoft.methanol.internal.cache.HttpDates
- isIdempotent(String) - Static method in class com.github.mizosoft.methanol.internal.util.Http
-
Returns whether the given request method is idempotent, and hence may be retried multiple times.
- isInformational(int) - Static method in class com.github.mizosoft.methanol.HttpStatus
-
Returns
trueifstatusCodeis a 1xx informational status code. - isInformational(HttpResponse) - Static method in class com.github.mizosoft.methanol.HttpStatus
-
Returns
trueifresponse.statusCode()is a 1xx informational status code. - isParameterizedType() - Method in class com.github.mizosoft.methanol.TypeRef
- isPrivate() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns
trueif theprivatedirective is set. - isPublic() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns
trueif thepublicdirective is set. - isRawType() - Method in class com.github.mizosoft.methanol.TypeRef
-
Returns
trueifTis a raw type (i.e. - isRedirection(int) - Static method in class com.github.mizosoft.methanol.HttpStatus
-
Returns
trueifstatusCodeis a 3xx redirection status code. - isRedirection(HttpResponse) - Static method in class com.github.mizosoft.methanol.HttpStatus
-
Returns
trueifresponse.statusCode()is a 3xx redirection status code. - isSafe(String) - Static method in class com.github.mizosoft.methanol.internal.util.Http
-
Returns whether the given request method is unsafe, and hence may invalidate cached entries.
- isServerError(int) - Static method in class com.github.mizosoft.methanol.HttpStatus
-
Returns
trueifstatusCodeis a 5xx server error status code. - isServerError(HttpResponse) - Static method in class com.github.mizosoft.methanol.HttpStatus
-
Returns
trueifresponse.statusCode()is a 5xx server error status code. - isSet() - Method in class com.github.mizosoft.methanol.internal.flow.Upstream
-
Returns
trueif the subscription wasset. - isSuccessful(int) - Static method in class com.github.mizosoft.methanol.HttpStatus
-
Returns
trueifstatusCodeis a 2xx successful status code. - isSuccessful(HttpResponse) - Static method in class com.github.mizosoft.methanol.HttpStatus
-
Returns
trueifresponse.statusCode()is a 2xx successful status code. - isTypeVariable() - Method in class com.github.mizosoft.methanol.TypeRef
- isValidHeaderName(String) - Static method in class com.github.mizosoft.methanol.internal.Utils
- isValidToken(CharSequence) - Static method in class com.github.mizosoft.methanol.internal.Utils
- isWildcard() - Method in class com.github.mizosoft.methanol.TypeRef
- iterator() - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- iterator() - Method in class com.github.mizosoft.methanol.internal.cache.MemoryStore
- iterator() - Method in interface com.github.mizosoft.methanol.internal.cache.Store
-
Returns an iterator of
Viewersover the entries in this store.
K
- key() - Method in interface com.github.mizosoft.methanol.internal.cache.Store.Editor
-
Returns the entry's key.
- key() - Method in interface com.github.mizosoft.methanol.internal.cache.Store.Viewer
-
Returns the entry's key.
L
- lastQuery(String) - Method in class com.github.mizosoft.methanol.FormBodyPublisher
-
Returns the last value of the query associated with the given key.
- lastValue(String) - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- Lazy<T> - Class in com.github.mizosoft.methanol.internal.concurrent
- letters() - Static method in interface com.github.mizosoft.methanol.internal.text.CharMatcher
- lettersOrDigits() - Static method in interface com.github.mizosoft.methanol.internal.text.CharMatcher
- linear(Duration, Duration) - Static method in interface com.github.mizosoft.methanol.RetryInterceptor.BackoffStrategy
-
Returns a
BackoffStrategythat applies a linearly increasing delay every retry, wherebasespecifies the first delay, andcapspecifies the maximum delay. - listener() - Method in class com.github.mizosoft.methanol.HttpCache
-
Returns the
HttpCache.Listenerset by the user. - listener(HttpCache.Listener) - Method in class com.github.mizosoft.methanol.HttpCache.Builder
-
Sets the cache's
Listener. - listener(RetryInterceptor.Listener) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Sets the listener for retry events.
- LocalCache - Interface in com.github.mizosoft.methanol.internal.cache
-
A response cache that provides APIs for retrieval, metadata updates, insertion and removal.
- LocalCache.Factory - Interface in com.github.mizosoft.methanol.internal.cache
M
- matches(char) - Method in interface com.github.mizosoft.methanol.internal.text.CharMatcher
- matches(HttpRequest) - Method in class com.github.mizosoft.methanol.internal.cache.CacheResponseMetadata
- max(T, T) - Static method in class com.github.mizosoft.methanol.internal.util.Compare
- maxAge() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns the value of the
max-agedirective if present. - maxAge(Duration) - Method in class com.github.mizosoft.methanol.CacheControl.Builder
-
Sets the
max-agedirective to the given duration. - maxRetries(int) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies the maximum times the interceptor is allowed to retry the request.
- maxSize() - Method in class com.github.mizosoft.methanol.HttpCache
-
Returns this cache's max size in bytes.
- maxSize() - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- maxSize() - Method in class com.github.mizosoft.methanol.internal.cache.MemoryStore
- maxSize() - Method in interface com.github.mizosoft.methanol.internal.cache.Store
-
Returns this store's max size in bytes.
- maxSize(long) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore.Builder
- maxStale() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns the value of the
max-staledirective if present. - maxStale(Duration) - Method in class com.github.mizosoft.methanol.CacheControl.Builder
-
Sets the
max-staledirective to the given duration. - mediaType() - Method in interface com.github.mizosoft.methanol.BodyAdapter.Hints
-
Returns the
MediaTypehint. - mediaType() - Method in class com.github.mizosoft.methanol.FormBodyPublisher
- mediaType() - Method in class com.github.mizosoft.methanol.internal.extensions.MimeBodyPublisherAdapter
- mediaType() - Method in interface com.github.mizosoft.methanol.MimeBodyPublisher
-
Returns the body's media type.
- mediaType() - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher
- mediaType(MediaType) - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher.Builder
-
Sets the media type of the multipart body.
- MediaType - Class in com.github.mizosoft.methanol
-
A MIME type.
- mediaTypeOrAny() - Method in interface com.github.mizosoft.methanol.BodyAdapter.Hints
-
Returns either the
MediaTypehint orMediaType.ANYif absent. - MemoryStore - Class in com.github.mizosoft.methanol.internal.cache
-
Storeimplementation that stores entries in memory. - MemoryStore(long) - Constructor for class com.github.mizosoft.methanol.internal.cache.MemoryStore
- metadata() - Method in interface com.github.mizosoft.methanol.internal.cache.Store.Viewer
-
Returns the entry's metadata as a readonly buffer.
- methanol - module methanol
-
Core Methanol module.
- Methanol - Class in com.github.mizosoft.methanol
-
An
HttpClientwith interceptors, request decoration, HTTP caching and reactive extensions. - Methanol.BaseBuilder<B> - Class in com.github.mizosoft.methanol
-
A base
Methanolbuilder allowing to set the non-standard properties. - Methanol.Builder - Class in com.github.mizosoft.methanol
-
A builder of
Methanolinstances. - Methanol.Interceptor - Interface in com.github.mizosoft.methanol
-
An object that intercepts requests before being sent and responses before being returned.
- Methanol.Interceptor.Chain<T> - Interface in com.github.mizosoft.methanol
-
An object that gives interceptors the ability to relay requests to sibling interceptors, till eventually being sent by the client's backend.
- Methanol.WithClientBuilder - Class in com.github.mizosoft.methanol
-
A builder for
Methanolinstances with a pre-specified backendHttpClient. - method() - Method in class com.github.mizosoft.methanol.MutableRequest
- method(String, Object, MediaType) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Sets the request method and sets the payload to the given value.
- method(String, HttpRequest.BodyPublisher) - Method in class com.github.mizosoft.methanol.MutableRequest
- method(String, HttpRequest.BodyPublisher) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
- method(String, T, TypeRef, MediaType) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Sets the request method and sets the payload to the given value with an explicitly specified type.
- mimeBody() - Method in class com.github.mizosoft.methanol.MutableRequest
- MimeBodyPublisher - Interface in com.github.mizosoft.methanol
-
A
BodyPublisherwith a media type. - MimeBodyPublisherAdapter - Class in com.github.mizosoft.methanol.internal.extensions
- MimeBodyPublisherAdapter(HttpRequest.BodyPublisher, MediaType) - Constructor for class com.github.mizosoft.methanol.internal.extensions.MimeBodyPublisherAdapter
- min(T, T) - Static method in class com.github.mizosoft.methanol.internal.util.Compare
- minFresh() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns the value of the
min-freshdirective if present. - minFresh(Duration) - Method in class com.github.mizosoft.methanol.CacheControl.Builder
-
Sets the
min-freshdirective to the given duration. - MISS - Enum constant in enum com.github.mizosoft.methanol.CacheAwareResponse.CacheStatus
-
Either the cache lacked a matching response or the matching response was stale but failed validation with the server and thus had to be re-downloaded.
- missCount() - Method in interface com.github.mizosoft.methanol.HttpCache.Stats
-
Returns the number of requests resulting in a cache miss, including conditional misses (unsatisfied revalidation requests).
- missRate() - Method in interface com.github.mizosoft.methanol.HttpCache.Stats
-
Returns a value between
0.0and1.0representing the ratio between the miss and request counts. - MoreBodyHandlers - Class in com.github.mizosoft.methanol
-
Static factories for additional
HttpResponse.BodyHandlerimplementations. - MoreBodyPublishers - Class in com.github.mizosoft.methanol
-
Static factories for additional
HttpRequest.BodyPublisherimplementations. - MoreBodySubscribers - Class in com.github.mizosoft.methanol
-
Static factories for additional
HttpResponse.BodySubscriberimplementations. - MultipartBodyPublisher - Class in com.github.mizosoft.methanol
-
A
BodyPublisherfor multipart bodies. - MultipartBodyPublisher.Builder - Class in com.github.mizosoft.methanol
-
A builder of
MultipartBodyPublisherinstances. - MultipartBodyPublisher.Part - Class in com.github.mizosoft.methanol
-
A part in a multipart request body.
- mustRevalidate() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns
trueif themust-revalidatedirective is set. - MutableRequest - Class in com.github.mizosoft.methanol
-
A mutable
HttpRequestthat supportstags, relative URIs&setting arbitrary objects as request bodies. - mutate() - Method in interface com.github.mizosoft.methanol.BodyAdapter.Hints
-
Returns a new
Buildercontaining this object's hints.
N
- networkResponse() - Method in interface com.github.mizosoft.methanol.CacheAwareResponse
-
Returns an
Optionalfor the response received as a result of using the network. - networkResponse(TrackedResponse) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- NetworkResponse - Class in com.github.mizosoft.methanol.internal.cache
-
A
RawResponsethat came from the network and may be written to cache. - networkUseCount() - Method in interface com.github.mizosoft.methanol.HttpCache.Stats
-
Returns the number of times the cache had to use the network.
- newBuilder() - Static method in class com.github.mizosoft.methanol.AdapterCodec
-
Returns a new
AdapterCodec.Builder. - newBuilder() - Static method in interface com.github.mizosoft.methanol.BodyAdapter.Hints
-
Returns a new
Builder. - newBuilder() - Static method in class com.github.mizosoft.methanol.CacheControl
-
Returns a new
Builder. - newBuilder() - Static method in class com.github.mizosoft.methanol.FormBodyPublisher
-
Returns a new
FormBodyPublisher.Builder. - newBuilder() - Static method in class com.github.mizosoft.methanol.HttpCache
-
Returns a new
HttpCache.Builder. - newBuilder() - Static method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- newBuilder() - Static method in class com.github.mizosoft.methanol.Methanol
-
Returns a new
Methanol.Builder. - newBuilder() - Static method in class com.github.mizosoft.methanol.MultipartBodyPublisher
-
Returns a new
MultipartBodyPublisher.Builder. - newBuilder() - Static method in class com.github.mizosoft.methanol.ProgressTracker
-
Returns a new
ProgressTracker.Builder. - newBuilder() - Static method in class com.github.mizosoft.methanol.RetryInterceptor
-
Returns a new builder of
RetryInterceptorinstances. - newBuilder(HttpClient) - Static method in class com.github.mizosoft.methanol.Methanol
-
Returns a new
Methanol.WithClientBuilderwith a prebuilt backend. - newIncompleteFuture() - Method in class com.github.mizosoft.methanol.internal.concurrent.CancellationPropagatingFuture
- newReader() - Method in interface com.github.mizosoft.methanol.internal.cache.Store.Viewer
-
Returns a new
Store.EntryReaderthat reads the entry's data stream from the start. - newWebSocketBuilder() - Method in class com.github.mizosoft.methanol.Methanol
- nextMatching(CharMatcher) - Method in class com.github.mizosoft.methanol.internal.text.HeaderValueTokenizer
- nextToken() - Method in class com.github.mizosoft.methanol.internal.text.HeaderValueTokenizer
- nextTokenOrQuotedString() - Method in class com.github.mizosoft.methanol.internal.text.HeaderValueTokenizer
- noCache() - Method in class com.github.mizosoft.methanol.CacheControl.Builder
-
Sets the
no-cachedirective. - noCache() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns
trueif theno-cachedirective is set. - noCacheFields() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns the header fields nominated by
no-cacheif specified. - none() - Static method in interface com.github.mizosoft.methanol.RetryInterceptor.BackoffStrategy
-
Returns a
BackoffStrategythat applies no delays. - NOOP_SUBSCRIPTION - Static variable in class com.github.mizosoft.methanol.internal.flow.FlowSupport
-
A subscription that does nothing.
- noStore() - Method in class com.github.mizosoft.methanol.CacheControl.Builder
-
Sets the
no-storedirective. - noStore() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns
trueif theno-storedirective is set. - noStoreFields() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns the header fields nominated by
no-storeif specified. - noTransform() - Method in class com.github.mizosoft.methanol.CacheControl.Builder
-
Sets the
no-transformdirective. - noTransform() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns
trueif theno-transformdirective is set.
O
- of(MediaType) - Static method in interface com.github.mizosoft.methanol.BodyAdapter.Hints
-
Returns a
Hintsobject containing the given media type. - of(TrackedResponse) - Static method in class com.github.mizosoft.methanol.internal.cache.NetworkResponse
- of(Class) - Static method in class com.github.mizosoft.methanol.TypeRef
-
Returns a new
TypeRefwho'sTypeRef.type()is the given class. - of(Type) - Static method in class com.github.mizosoft.methanol.TypeRef
-
Returns a new
TypeRefwho'sTypeRef.type()is the given type. - of(String, String) - Static method in class com.github.mizosoft.methanol.MediaType
-
Returns a new
MediaTypewith the given type and subtype. - of(String, String, Map) - Static method in class com.github.mizosoft.methanol.MediaType
-
Returns a new
MediaTypewith the given type, subtype and parameters. - of(HttpRequest, HttpResponse, Throwable, int) - Static method in interface com.github.mizosoft.methanol.RetryInterceptor.Context
-
Creates a new retry context based on the given state.
- of(HttpRequest, HttpResponse, Throwable, int, Instant) - Static method in interface com.github.mizosoft.methanol.RetryInterceptor.Context
-
Creates a new retry context based on the given state.
- of(CompletableFuture) - Static method in class com.github.mizosoft.methanol.internal.concurrent.CancellationPropagatingFuture
- of(CompletionStage) - Static method in class com.github.mizosoft.methanol.internal.concurrent.CancellationPropagatingFuture
- of(ScheduledExecutorService) - Static method in interface com.github.mizosoft.methanol.internal.concurrent.Delayer
- of(Supplier) - Static method in class com.github.mizosoft.methanol.internal.concurrent.Lazy
- ofByteChannel() - Static method in class com.github.mizosoft.methanol.MoreBodyHandlers
-
Returns a
BodyHandlerthat returns a subscriber obtained fromMoreBodySubscribers.ofByteChannel(). - ofByteChannel() - Static method in class com.github.mizosoft.methanol.MoreBodySubscribers
-
Returns a completed
BodySubscriberofReadableByteChannelthat reads the response body. - ofDeferredObject(TypeRef) - Static method in class com.github.mizosoft.methanol.MoreBodyHandlers
-
Returns a
BodyHandlerthat returns a subscriber obtained fromMoreBodySubscribers.ofDeferredObject(TypeRef, MediaType). - ofDeferredObject(TypeRef, MediaType) - Static method in class com.github.mizosoft.methanol.MoreBodySubscribers
-
Returns a
BodySubscriberthat decodes the response body into an object of the given type using an installeddecoder. - ofDeferredObject(Class) - Static method in class com.github.mizosoft.methanol.MoreBodyHandlers
-
Returns a
BodyHandlerthat returns a subscriber obtained fromMoreBodySubscribers.ofDeferredObject(TypeRef, MediaType). - ofMediaType(HttpRequest.BodyPublisher, MediaType) - Static method in class com.github.mizosoft.methanol.MoreBodyPublishers
-
Adapts the given
BodyPublisherinto aMimeBodyPublisherwith the given media type. - ofObject(TypeRef) - Static method in class com.github.mizosoft.methanol.MoreBodyHandlers
-
Returns a
BodyHandlerthat returns a subscriber obtained fromMoreBodySubscribers.ofObject(TypeRef, MediaType). - ofObject(TypeRef, MediaType) - Static method in class com.github.mizosoft.methanol.MoreBodySubscribers
-
Returns a
BodySubscriberthat decodes the response body into an object of the given type using an installeddecoder. - ofObject(Class) - Static method in class com.github.mizosoft.methanol.MoreBodyHandlers
-
Returns a
BodyHandlerthat returns a subscriber obtained fromMoreBodySubscribers.ofObject(TypeRef, MediaType). - ofObject(Object, MediaType) - Static method in class com.github.mizosoft.methanol.MoreBodyPublishers
-
Returns a
BodyPublisherthat encodes the given object into a request body using an installedencoder. - ofOutputStream(ThrowingConsumer, Executor) - Static method in class com.github.mizosoft.methanol.MoreBodyPublishers
-
Returns a
BodyPublisherthat reads what's written to theOutputStreamreceived by the given task. - ofReader() - Static method in class com.github.mizosoft.methanol.MoreBodyHandlers
-
Returns a
BodyHandlerthat returns a subscriber obtained formMoreBodySubscribers.ofReader(Charset)using the charset specified by theContent-Typeheader, orUTF-8if not present. - ofReader(Charset) - Static method in class com.github.mizosoft.methanol.MoreBodyHandlers
-
Returns a
BodyHandlerthat returns a subscriber obtained fromMoreBodySubscribers.ofReader(Charset)using the given charset. - ofReader(Charset) - Static method in class com.github.mizosoft.methanol.MoreBodySubscribers
-
Returns a completed
BodySubscriberofReaderthat reads the response body as a stream of characters decoded using the given charset. - ofRuntimeType(T) - Static method in class com.github.mizosoft.methanol.TypeRef
-
Returns a new
TypeRefwho'sTypeRef.type()is the runtime type of the given instance. - ofWritableByteChannel(ThrowingConsumer, Executor) - Static method in class com.github.mizosoft.methanol.MoreBodyPublishers
-
Returns a
BodyPublisherthat reads what's written to theWritableByteChannelreceived by the given task. - on(Predicate) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies that the interceptor is to retry the request if the retry
RetryInterceptor.Contextsatisfies the given predicate. - on(Predicate, Function) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies that the interceptor is to retry the request, after applying the given request modifier, if the retry
RetryInterceptor.Contextsatisfies the given predicate. - onComplete() - Method in class com.github.mizosoft.methanol.decoder.AsyncBodyDecoder
- onComplete() - Method in class com.github.mizosoft.methanol.internal.extensions.ByteChannelBodySubscriber
- onComplete() - Method in class com.github.mizosoft.methanol.internal.extensions.PublisherBodySubscriber
- onComplete() - Method in class com.github.mizosoft.methanol.internal.flow.ForwardingSubscriber
- onComplete() - Method in class com.github.mizosoft.methanol.internal.flow.SerializedForwardingSubscriber
- onComplete() - Method in class com.github.mizosoft.methanol.internal.flow.TimeoutSubscriber
- onComplete() - Method in interface com.github.mizosoft.methanol.ProgressTracker.Listener
- onComplete() - Method in interface com.github.mizosoft.methanol.ProgressTracker.MultipartListener
- onComplete(RetryInterceptor.Context) - Method in interface com.github.mizosoft.methanol.RetryInterceptor.Listener
-
Called when the interceptor is about to return the given state as-is because no retry condition matches.
- onDisk(Path, long) - Static method in interface com.github.mizosoft.methanol.StorageExtension
-
Returns a
StorageExtensionfor saving data on disk under the given directory, not exceeding the given size. - onDroppedException(Throwable) - Static method in class com.github.mizosoft.methanol.internal.flow.FlowSupport
- onError(Throwable) - Method in class com.github.mizosoft.methanol.decoder.AsyncBodyDecoder
- onError(Throwable) - Method in class com.github.mizosoft.methanol.internal.extensions.ByteChannelBodySubscriber
- onError(Throwable) - Method in class com.github.mizosoft.methanol.internal.extensions.PublisherBodySubscriber
- onError(Throwable) - Method in class com.github.mizosoft.methanol.internal.flow.ForwardingSubscriber
- onError(Throwable) - Method in class com.github.mizosoft.methanol.internal.flow.SerializedForwardingSubscriber
- onError(Throwable) - Method in class com.github.mizosoft.methanol.internal.flow.TimeoutSubscriber
- onError(Throwable) - Method in interface com.github.mizosoft.methanol.ProgressTracker.Listener
- onError(Throwable) - Method in interface com.github.mizosoft.methanol.ProgressTracker.MultipartListener
- onException(Class...) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies that the interceptor is to retry the request if an exception with any of the given types is thrown.
- onException(Predicate) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies that the interceptor is to retry the request if an exception that satisfies the given predicate is thrown.
- onException(Predicate, Function) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies that the interceptor is to retry the request, after applying the given request modifier, if an exception that satisfies the given predicate is thrown.
- onException(Set, Function) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies that the interceptor is to retry the request, after applying the given request modifier, if an exception with any of the given types is thrown.
- onExhaustion(RetryInterceptor.Context) - Method in interface com.github.mizosoft.methanol.RetryInterceptor.Listener
-
Called when the interceptor exhausts allowed retry attempts.
- onFirstAttempt(HttpRequest) - Method in interface com.github.mizosoft.methanol.RetryInterceptor.Listener
-
Called when the interceptor is about to send the request for the first time.
- onlyIfCached() - Method in class com.github.mizosoft.methanol.CacheControl.Builder
-
Sets the
only-if-cacheddirective. - onlyIfCached() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns
trueif theonly-if-cacheddirective is set. - onNetworkUse(HttpRequest, TrackedResponse) - Method in interface com.github.mizosoft.methanol.HttpCache.Listener
-
Called when the cache is about to use the network due to a cache miss.
- onNext(List) - Method in class com.github.mizosoft.methanol.decoder.AsyncBodyDecoder
- onNext(List) - Method in class com.github.mizosoft.methanol.internal.extensions.ByteChannelBodySubscriber
- onNext(List) - Method in class com.github.mizosoft.methanol.internal.extensions.PublisherBodySubscriber
- onNext(T) - Method in class com.github.mizosoft.methanol.internal.flow.ForwardingSubscriber
- onNext(T) - Method in class com.github.mizosoft.methanol.internal.flow.SerializedForwardingSubscriber
- onNext(T) - Method in class com.github.mizosoft.methanol.internal.flow.TimeoutSubscriber
- onReadFailure(Throwable) - Method in interface com.github.mizosoft.methanol.internal.cache.CacheReadingPublisher.Listener
- onReadFailure(HttpRequest, Throwable) - Method in interface com.github.mizosoft.methanol.HttpCache.Listener
-
Called when a failure is encountered while reading the response body from cache.
- onReadSuccess() - Method in interface com.github.mizosoft.methanol.internal.cache.CacheReadingPublisher.Listener
- onReadSuccess(HttpRequest) - Method in interface com.github.mizosoft.methanol.HttpCache.Listener
-
Called when the response body has been successfully read from cache.
- onRequest(HttpRequest) - Method in interface com.github.mizosoft.methanol.HttpCache.Listener
-
Called when the cache receives a request.
- onResponse(HttpRequest, CacheAwareResponse) - Method in interface com.github.mizosoft.methanol.HttpCache.Listener
-
Called when the cache is ready to serve the response.
- onResponse(Predicate) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies that the interceptor is to retry the request if a response that satisfies the given predicate is received.
- onResponse(Predicate, Function) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies that the interceptor is to retry the request, after applying the given request modifier, if a response that satisfies the given predicate is received.
- onRetry(RetryInterceptor.Context, HttpRequest, Duration) - Method in interface com.github.mizosoft.methanol.RetryInterceptor.Listener
-
Called when the interceptor is about to retry a request.
- onStatus(int...) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies that the interceptor is to retry the request if a response with any of the given status codes is received.
- onStatus(Predicate) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies that the interceptor is to retry the request if a response whose code satisfies the given predicate is received.
- onStatus(Predicate, Function) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies that the interceptor is to retry the request, after applying the given request modifier, if a response whose code satisfies the given predicate is received.
- onStatus(Set, Function) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies that the interceptor is to retry the request, after applying the given request modifier, if a response with any of the given status codes is received.
- onSubscribe(Flow.Subscription) - Method in class com.github.mizosoft.methanol.decoder.AsyncBodyDecoder
- onSubscribe(Flow.Subscription) - Method in class com.github.mizosoft.methanol.internal.extensions.ByteChannelBodySubscriber
- onSubscribe(Flow.Subscription) - Method in class com.github.mizosoft.methanol.internal.extensions.PublisherBodySubscriber
- onSubscribe(Flow.Subscription) - Method in class com.github.mizosoft.methanol.internal.flow.ForwardingSubscriber
- onSubscribe(Flow.Subscription) - Method in class com.github.mizosoft.methanol.internal.flow.SerializedForwardingSubscriber
- onSubscribe(Flow.Subscription) - Method in class com.github.mizosoft.methanol.internal.flow.TimeoutSubscriber
- onSubscribe(Flow.Subscription) - Method in interface com.github.mizosoft.methanol.ProgressTracker.Listener
- onSubscribe(Flow.Subscription) - Method in interface com.github.mizosoft.methanol.ProgressTracker.MultipartListener
- onTimeout(Runnable, Executor) - Method in class com.github.mizosoft.methanol.internal.concurrent.Timeout
- onWriteFailure(Throwable) - Method in interface com.github.mizosoft.methanol.internal.cache.CacheWritingPublisher.Listener
- onWriteFailure(HttpRequest, Throwable) - Method in interface com.github.mizosoft.methanol.HttpCache.Listener
-
Called when a failure is encountered while writing the response to cache.
- onWriteSuccess() - Method in interface com.github.mizosoft.methanol.internal.cache.CacheWritingPublisher.Listener
- onWriteSuccess(HttpRequest) - Method in interface com.github.mizosoft.methanol.HttpCache.Listener
-
Called when the response has been successfully written to cache.
- or(CharMatcher) - Method in interface com.github.mizosoft.methanol.internal.text.CharMatcher
- outputStream() - Method in class com.github.mizosoft.methanol.WritableBodyPublisher
-
Returns a
OutputStreamfor writing this body's content. - OWS_MATCHER - Static variable in class com.github.mizosoft.methanol.internal.text.HttpCharMatchers
P
- parameters() - Method in class com.github.mizosoft.methanol.MediaType
-
Returns an immutable map representing the parameters.
- parse(String) - Static method in class com.github.mizosoft.methanol.CacheControl
-
Parses the cache directives specified by the given value.
- parse(String) - Static method in class com.github.mizosoft.methanol.MediaType
-
Parses the given string into a
MediaTypeinstance. - parse(HttpHeaders) - Static method in class com.github.mizosoft.methanol.CacheControl
-
Parses the cache directives specified by the given headers.
- parse(List) - Static method in class com.github.mizosoft.methanol.CacheControl
-
Parses the cache directives specified by each of the given values.
- parseDeltaSeconds(String) - Static method in class com.github.mizosoft.methanol.internal.cache.HttpDates
- part() - Method in interface com.github.mizosoft.methanol.ProgressTracker.MultipartProgress
-
Returns the currently progressing part.
- part(MultipartBodyPublisher.Part) - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher.Builder
-
Adds the given part.
- partChanged() - Method in interface com.github.mizosoft.methanol.ProgressTracker.MultipartProgress
-
Returns
trueif the currently progressing part has changed from the last event. - partProgress() - Method in interface com.github.mizosoft.methanol.ProgressTracker.MultipartProgress
-
Returns current part's progress.
- parts() - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher
-
Returns an immutable list containing this body's parts.
- PATCH(Object, MediaType) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Sets the request method to PATCH and sets the payload to the given value.
- PATCH(String, Object, MediaType) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a PATCH method. - PATCH(String, HttpRequest.BodyPublisher) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a PATCH method. - PATCH(String, T, TypeRef, MediaType) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a PATCH method. - PATCH(HttpRequest.BodyPublisher) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Sets the request method to PATCH and sets the body publisher to the given value.
- PATCH(URI, Object, MediaType) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a PATCH method. - PATCH(URI, HttpRequest.BodyPublisher) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a PATCH method. - PATCH(URI, T, TypeRef, MediaType) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a PATCH method. - PATCH(T, TypeRef, MediaType) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Sets the request method to PATCH and sets the payload to the given value with an explicitly specified type.
- PayloadHandlerExecutor - Class in com.github.mizosoft.methanol.internal.adapter
-
Holds the executor to be used for handling a
ResponsePayload. - PayloadHandlerExecutor(Executor) - Constructor for class com.github.mizosoft.methanol.internal.adapter.PayloadHandlerExecutor
- poll() - Method in class com.github.mizosoft.methanol.internal.flow.AbstractPollableSubscription
-
Returns the next item, or
nullif no items are available. - poll() - Method in class com.github.mizosoft.methanol.internal.flow.AbstractQueueSubscription
- POST(Object, MediaType) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Sets the request method to POST and sets the payload to the given value.
- POST(String, Object, MediaType) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a POST method. - POST(String, HttpRequest.BodyPublisher) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a POST method. - POST(String, T, TypeRef, MediaType) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a POST method. - POST(HttpRequest.BodyPublisher) - Method in class com.github.mizosoft.methanol.MutableRequest
- POST(HttpRequest.BodyPublisher) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
- POST(URI, Object, MediaType) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a POST method. - POST(URI, HttpRequest.BodyPublisher) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a POST method. - POST(URI, T, TypeRef, MediaType) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a POST method. - POST(T, TypeRef, MediaType) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Sets the request method to POST and sets the payload to the given value with an explicitly specified type.
- postDecorationInterceptor(Methanol.Interceptor) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Deprecated.
- postDecorationInterceptors() - Method in class com.github.mizosoft.methanol.Methanol
-
Deprecated.
- prefetch() - Static method in class com.github.mizosoft.methanol.internal.flow.FlowSupport
-
Returns the prefetch property or a default of 8.
- Prefetcher - Class in com.github.mizosoft.methanol.internal.flow
-
An object that manages requests to an upstream subscription according to a prefetching policy.
- Prefetcher() - Constructor for class com.github.mizosoft.methanol.internal.flow.Prefetcher
- Prefetcher(int, int) - Constructor for class com.github.mizosoft.methanol.internal.flow.Prefetcher
- prefetchThreshold() - Static method in class com.github.mizosoft.methanol.internal.flow.FlowSupport
-
Returns the prefetch threshold according to the prefetch factor property or a default of 8
/ 2. - previousResponse(HttpResponse) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- priority(int) - Method in class com.github.mizosoft.methanol.Methanol.Builder
- privateFields() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns the header fields nominated by
privateif specified. - ProgressTracker - Class in com.github.mizosoft.methanol
-
A progress tracker for upload and download operations.
- ProgressTracker.Builder - Class in com.github.mizosoft.methanol
-
A builder of
ProgressTrackers. - ProgressTracker.Listener - Interface in com.github.mizosoft.methanol
-
A listener of
progress events. - ProgressTracker.MultipartListener - Interface in com.github.mizosoft.methanol
- ProgressTracker.MultipartProgress - Interface in com.github.mizosoft.methanol
-
A progress event for a multipart body with per-part progress info.
- ProgressTracker.Progress - Interface in com.github.mizosoft.methanol
-
A progress event.
- propagateIfUnchecked(Throwable) - Static method in class com.github.mizosoft.methanol.internal.function.Unchecked
- proxy() - Method in class com.github.mizosoft.methanol.Methanol
- proxy(ProxySelector) - Method in class com.github.mizosoft.methanol.Methanol.Builder
- proxyRevalidate() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns
trueif theproxy-revalidatedirective is set. - PublisherBodySubscriber - Class in com.github.mizosoft.methanol.internal.extensions
-
A
HttpResponse.BodySubscriberthat exposes the response body as a publisher. - PublisherBodySubscriber() - Constructor for class com.github.mizosoft.methanol.internal.extensions.PublisherBodySubscriber
- publisherOf(T, BodyAdapter.Hints) - Method in class com.github.mizosoft.methanol.AdapterCodec
-
Returns a
HttpRequest.BodyPublisherthat encodes the given object into a request body. - publisherOf(T, TypeRef, BodyAdapter.Hints) - Method in class com.github.mizosoft.methanol.AdapterCodec
-
Returns a
HttpRequest.BodyPublisherthat encodes the given object into a request body with respect to the givenTypeRef. - pullBytes(ByteBuffer) - Method in interface com.github.mizosoft.methanol.decoder.AsyncDecoder.ByteSource
-
Pulls
min(this.remaining(), dst.remaining())bytes from this source to the given destination buffer. - pushBytes(ByteBuffer) - Method in interface com.github.mizosoft.methanol.decoder.AsyncDecoder.ByteSink
-
Pushes
src.remaining()bytes from the given source buffer to this sink. - pushPromiseHandler() - Method in interface com.github.mizosoft.methanol.Methanol.Interceptor.Chain
-
Returns the
PushPromiseHandlerthis chain uses for handling push promises. - put(Class, T) - Method in class com.github.mizosoft.methanol.BodyAdapter.Hints.Builder
-
Maps the given type to the given hint.
- put(HttpRequest, NetworkResponse, CacheResponse) - Method in interface com.github.mizosoft.methanol.internal.cache.LocalCache
- PUT(Object, MediaType) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Sets the request method to PUT and sets the payload to the given value.
- PUT(String, Object, MediaType) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a PUT method. - PUT(String, HttpRequest.BodyPublisher) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a PUT method. - PUT(String, T, TypeRef, MediaType) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a PUT method. - PUT(HttpRequest.BodyPublisher) - Method in class com.github.mizosoft.methanol.MutableRequest
- PUT(HttpRequest.BodyPublisher) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
- PUT(URI, Object, MediaType) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a PUT method. - PUT(URI, HttpRequest.BodyPublisher) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a PUT method. - PUT(URI, T, TypeRef, MediaType) - Static method in class com.github.mizosoft.methanol.MutableRequest
-
Returns a new
MutableRequestwith the given URI and a PUT method. - PUT(T, TypeRef, MediaType) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Sets the request method to PUT and sets the payload to the given value with an explicitly specified type.
Q
- queries() - Method in class com.github.mizosoft.methanol.FormBodyPublisher
-
Returns this body's queries.
- query(String, String) - Method in class com.github.mizosoft.methanol.FormBodyPublisher.Builder
-
Adds the query specified by the given name and value.
- QUOTED_PAIR_MATCHER - Static variable in class com.github.mizosoft.methanol.internal.text.HttpCharMatchers
- QUOTED_TEXT_MATCHER - Static variable in class com.github.mizosoft.methanol.internal.text.HttpCharMatchers
R
- RawResponse - Class in com.github.mizosoft.methanol.internal.cache
-
A response with a "raw" body that is yet to be handled.
- rawType() - Method in class com.github.mizosoft.methanol.TypeRef
-
Returns the
Class<? super T>that represents the resolved raw type ofT. - read(ByteBuffer) - Method in interface com.github.mizosoft.methanol.internal.cache.Store.EntryReader
-
Synchronous variant of
Store.EntryReader.read(ByteBuffer, Executor). - read(ByteBuffer, Executor) - Method in interface com.github.mizosoft.methanol.internal.cache.Store.EntryReader
-
Reads as many bytes as possible from the data stream into the given buffer, and returns the number of read bytes, or
-1if reached EOF. - read(List) - Method in interface com.github.mizosoft.methanol.internal.cache.Store.EntryReader
-
Synchronous variant of
Store.EntryReader.read(List, Executor). - read(List, Executor) - Method in interface com.github.mizosoft.methanol.internal.cache.Store.EntryReader
-
Reads as many bytes as possible from the data stream into the given buffers, in sequential order, and returns the number of read bytes, or
-1if reached EOF. - readFailureCount() - Method in interface com.github.mizosoft.methanol.HttpCache.Stats
-
Returns the number of times a response wasn't read from cache due to a read failure.
- readSuccessCount() - Method in interface com.github.mizosoft.methanol.HttpCache.Stats
-
Returns the number of times a response was successfully read from cache.
- readTimeout() - Method in class com.github.mizosoft.methanol.Methanol
-
Returns the
read timeoutused for every request. - readTimeout(Duration) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Sets a
read timeoutthat is applied to every request. - readTimeout(Duration, ScheduledExecutorService) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Sets a default
readtimeoutthat is applied to very request, using the givenScheduledExecutorServicefor scheduling timeout events. - recordHit(URI) - Method in interface com.github.mizosoft.methanol.HttpCache.StatsRecorder
-
Called when a request results in a cache hit, either directly or after successful revalidation with the server.
- recordMiss(URI) - Method in interface com.github.mizosoft.methanol.HttpCache.StatsRecorder
-
Called when a request results in a cache miss, either due to a missing cache entry or after failed revalidation with the server.
- recordNetworkUse(URI) - Method in interface com.github.mizosoft.methanol.HttpCache.StatsRecorder
-
Called when the cache is about to use the network.
- recordReadFailure(URI) - Method in interface com.github.mizosoft.methanol.HttpCache.StatsRecorder
-
Called when a failure is encountered while reading a response from cache.
- recordReadSuccess(URI) - Method in interface com.github.mizosoft.methanol.HttpCache.StatsRecorder
-
Called when a response is successfully read from cache.
- recordRequest(URI) - Method in interface com.github.mizosoft.methanol.HttpCache.StatsRecorder
-
Called when a request is intercepted by the cache.
- recordWriteFailure(URI) - Method in interface com.github.mizosoft.methanol.HttpCache.StatsRecorder
-
Called when a failure is encountered while writing a response to cache.
- recordWriteSuccess(URI) - Method in interface com.github.mizosoft.methanol.HttpCache.StatsRecorder
-
Called when a response is successfully written to cache.
- RedirectingInterceptor - Class in com.github.mizosoft.methanol.internal.cache
-
An
Methanol.Interceptorthat follows redirects. - RedirectingInterceptor(HttpClient.Redirect, Executor) - Constructor for class com.github.mizosoft.methanol.internal.cache.RedirectingInterceptor
- reject(Flow.Subscriber, Throwable) - Static method in class com.github.mizosoft.methanol.internal.flow.FlowSupport
- rejectMulticast(Flow.Subscriber) - Static method in class com.github.mizosoft.methanol.internal.flow.FlowSupport
- remaining() - Method in interface com.github.mizosoft.methanol.decoder.AsyncDecoder.ByteSource
-
Returns the total number of bytes remaining in this source.
- remaining(ByteBuffer[]) - Static method in class com.github.mizosoft.methanol.internal.Utils
- remaining(List) - Static method in class com.github.mizosoft.methanol.internal.Utils
- remove(Class) - Method in class com.github.mizosoft.methanol.BodyAdapter.Hints.Builder
-
Removes the hint mapped to by the given type.
- remove(String) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- remove(String) - Method in class com.github.mizosoft.methanol.internal.cache.MemoryStore
- remove(String) - Method in interface com.github.mizosoft.methanol.internal.cache.Store
-
Removes the entry associated with the given key.
- remove(String) - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- remove(HttpRequest) - Method in class com.github.mizosoft.methanol.HttpCache
-
Removes the entry associated with the given request if one is present.
- remove(URI) - Method in class com.github.mizosoft.methanol.HttpCache
-
Removes the entry associated with the given URI if one is present.
- removeAll() - Method in class com.github.mizosoft.methanol.BodyAdapter.Hints.Builder
-
Removes all hints added so far.
- removeAll(List) - Method in interface com.github.mizosoft.methanol.internal.cache.Store
-
Removes all the entries associated with the given keys.
- removeAll(List) - Method in interface com.github.mizosoft.methanol.internal.cache.LocalCache
- removeEntry() - Method in interface com.github.mizosoft.methanol.internal.cache.Store.Viewer
-
Removes the entry associated with this viewer only if it hasn't changed since this viewer was opened.
- removeHeader(String) - Method in interface com.github.mizosoft.methanol.HeadersAccumulator
-
Removes all the header values associated with the given name.
- removeHeader(String) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Removes any header associated with the given name.
- removeHeader(String) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- removeHeaders() - Method in interface com.github.mizosoft.methanol.HeadersAccumulator
-
Removes all the headers added so far.
- removeHeaders() - Method in class com.github.mizosoft.methanol.MutableRequest
-
Removes all headers added so far.
- removeHeaders() - Method in class com.github.mizosoft.methanol.ResponseBuilder
- removeHeadersIf(BiPredicate) - Method in interface com.github.mizosoft.methanol.HeadersAccumulator
-
Removes all the header name-value pairs matched by the given predicate.
- removeHeadersIf(BiPredicate) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Removes all headers matched by the given predicate.
- removeHeadersIf(BiPredicate) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- removeIf(BiPredicate) - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- removeTag(TypeRef) - Method in class com.github.mizosoft.methanol.MutableRequest
- removeTag(TypeRef) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
-
Removes the tag associated with the given type.
- removeTag(Class) - Method in class com.github.mizosoft.methanol.MutableRequest
- removeTag(Class) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
-
Removes the tag associated with the given type.
- request() - Method in interface com.github.mizosoft.methanol.BodyAdapter.Hints
-
Returns the
HttpRequesthint. - request() - Method in interface com.github.mizosoft.methanol.RetryInterceptor.Context
-
Returns the last-sent request.
- request(long) - Method in class com.github.mizosoft.methanol.internal.flow.AbstractSubscription
- request(long) - Method in class com.github.mizosoft.methanol.internal.flow.Upstream
-
Requests
nitems from upstream if set. - request(HttpRequest) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- requestCount() - Method in interface com.github.mizosoft.methanol.HttpCache.Stats
-
Returns the number of requests intercepted by the cache.
- requestTimeout() - Method in class com.github.mizosoft.methanol.Methanol
-
Returns the default
request timeoutused when no timeout is explicitly set on anHttpRequest. - requestTimeout(Duration) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Sets a defaultto use on every request when no timeout is explicitly set on an
invalid reference
request timeoutHttpRequest.Builder. - requireArgument(boolean, String) - Static method in class com.github.mizosoft.methanol.internal.Validate
- requireArgument(boolean, String, Object...) - Static method in class com.github.mizosoft.methanol.internal.Validate
- requireCharacter(char) - Method in class com.github.mizosoft.methanol.internal.text.HeaderValueTokenizer
- requireCompatibleOrNull(MediaType) - Method in class com.github.mizosoft.methanol.adapter.AbstractBodyAdapter
-
Requires that either this adapter is
compatiblewith the given media type, or the given media type isnull. - requireNonNegativeDuration(Duration) - Static method in class com.github.mizosoft.methanol.internal.Utils
- requirePositiveDuration(Duration) - Static method in class com.github.mizosoft.methanol.internal.Utils
- requiresBackgroundRevalidation() - Method in class com.github.mizosoft.methanol.internal.cache.CacheStrategy
- requireState(boolean, String) - Static method in class com.github.mizosoft.methanol.internal.Validate
- requireState(boolean, String, Object...) - Static method in class com.github.mizosoft.methanol.internal.Validate
- requireSupport(TypeRef) - Method in class com.github.mizosoft.methanol.adapter.AbstractBodyAdapter
-
Requires that this adapter
supportsthe given type. - requireSupport(TypeRef, BodyAdapter.Hints) - Method in class com.github.mizosoft.methanol.adapter.AbstractBodyAdapter
-
Requires that this adapter
supportsthe given type andis compatible withthe given hints' media type, if any. - requireSupport(Class) - Method in class com.github.mizosoft.methanol.adapter.AbstractBodyAdapter
-
Requires that this adapter
supportsthe given type. - requireValidHeader(String, String) - Static method in class com.github.mizosoft.methanol.internal.Utils
- requireValidHeaderName(String) - Static method in class com.github.mizosoft.methanol.internal.Utils
- requireValidHeaderValue(String) - Static method in class com.github.mizosoft.methanol.internal.Utils
- requireValidToken(S) - Static method in class com.github.mizosoft.methanol.internal.Utils
- resolveSupertype(Class) - Method in class com.github.mizosoft.methanol.TypeRef
-
Resolves the given supertype into a type with concrete type arguments (if any) that are derived from this type (i.e.
- response() - Method in interface com.github.mizosoft.methanol.RetryInterceptor.Context
-
Returns the resulting response.
- ResponseBuilder<T> - Class in com.github.mizosoft.methanol
-
A builder of
HttpResponseinstances. - responseInfo() - Method in interface com.github.mizosoft.methanol.BodyAdapter.Hints
-
Returns the
ResponseInfohint. - ResponsePayload - Interface in com.github.mizosoft.methanol
-
A response body that is yet to be handled into the desirable type.
- retryAfterOr(RetryInterceptor.BackoffStrategy) - Static method in interface com.github.mizosoft.methanol.RetryInterceptor.BackoffStrategy
-
Returns a
BackoffStrategythat gets the delay from the value of response'sRetry-Afterheader, or defers to the givenBackoffStrategyif no such header exists. - retryCount() - Method in interface com.github.mizosoft.methanol.RetryInterceptor.Context
-
Returns the number of times the request has been retried.
- RetryInterceptor - Class in com.github.mizosoft.methanol
-
An interceptor that retries HTTP requests based on configurable conditions.
- RetryInterceptor.BackoffStrategy - Interface in com.github.mizosoft.methanol
-
A strategy for backing off (delaying) before a retry.
- RetryInterceptor.Builder - Class in com.github.mizosoft.methanol
-
A builder of
RetryInterceptorinstances. - RetryInterceptor.Context<T> - Interface in com.github.mizosoft.methanol
-
Context for deciding whether an HTTP call should be retried.
- RetryInterceptor.Listener - Interface in com.github.mizosoft.methanol
-
A listener for
RetryInterceptorevents. - retryNonIdempotent() - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies that requests that are not idempotent are to be retried.
- run() - Method in interface com.github.mizosoft.methanol.internal.function.ThrowingRunnable
- runAsync(ThrowingRunnable, Executor) - Static method in class com.github.mizosoft.methanol.internal.function.Unchecked
- runnable(ThrowingRunnable) - Static method in class com.github.mizosoft.methanol.internal.function.Unchecked
S
- scheduler() - Static method in class com.github.mizosoft.methanol.internal.concurrent.SharedExecutors
- send(HttpRequest, TypeRef) - Method in class com.github.mizosoft.methanol.Methanol
-
Sendsthe given request and converts the response body into an object of the given type. - send(HttpRequest, Class) - Method in class com.github.mizosoft.methanol.Methanol
-
Sendsthe given request and converts the response body into an object of the given type. - send(HttpRequest, HttpResponse.BodyHandler) - Method in class com.github.mizosoft.methanol.Methanol
- sendAsync(HttpRequest, TypeRef) - Method in class com.github.mizosoft.methanol.Methanol
-
Asynchronously sendsthe given request and converts the response body into an object of the given type. - sendAsync(HttpRequest, Class) - Method in class com.github.mizosoft.methanol.Methanol
-
Asynchronously sendsthe given request and converts the response body into an object of the given type. - sendAsync(HttpRequest, HttpResponse.BodyHandler) - Method in class com.github.mizosoft.methanol.Methanol
- sendAsync(HttpRequest, HttpResponse.BodyHandler, HttpResponse.PushPromiseHandler) - Method in class com.github.mizosoft.methanol.Methanol
- SerialExecutor - Class in com.github.mizosoft.methanol.internal.concurrent
-
An executor that ensures submitted tasks are executed serially.
- SerialExecutor(Executor) - Constructor for class com.github.mizosoft.methanol.internal.concurrent.SerialExecutor
- SerializedForwardingSubscriber<T> - Class in com.github.mizosoft.methanol.internal.flow
-
A forwarding subscriber that ensures the delegate isn't called concurrently.
- SerializedForwardingSubscriber() - Constructor for class com.github.mizosoft.methanol.internal.flow.SerializedForwardingSubscriber
- ServiceProviders<S> - Class in com.github.mizosoft.methanol.internal.spi
-
An object that loads & caches service providers.
- ServiceProviders(Class) - Constructor for class com.github.mizosoft.methanol.internal.spi.ServiceProviders
- set(String, String) - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- set(String, List) - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- setHeader(String, String) - Method in interface com.github.mizosoft.methanol.HeadersAccumulator
-
Sets the header represented by the given name to the given value, overwriting the previous value (if any).
- setHeader(String, String) - Method in class com.github.mizosoft.methanol.MutableRequest
- setHeader(String, String) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- setHeader(String, String) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
- setHeader(String, List) - Method in interface com.github.mizosoft.methanol.HeadersAccumulator
-
Sets the header represented by the given name to the given values, overwriting the previous value (if any).
- setHeader(String, List) - Method in class com.github.mizosoft.methanol.MutableRequest
- setHeader(String, List) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- setHeaderIfAbsent(String, String) - Method in interface com.github.mizosoft.methanol.HeadersAccumulator
-
Sets the header represented by the given name to the given value, only if there was no header with the given name.
- setHeaderIfAbsent(String, String) - Method in class com.github.mizosoft.methanol.MutableRequest
- setHeaderIfAbsent(String, String) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- setHeaderIfAbsent(String, List) - Method in interface com.github.mizosoft.methanol.HeadersAccumulator
-
Sets the header represented by the given name to the given values, only if there was no header with the given name.
- setHeaderIfAbsent(String, List) - Method in class com.github.mizosoft.methanol.MutableRequest
- setHeaderIfAbsent(String, List) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- setIfAbsent(String, String) - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- setIfAbsent(String, List) - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- setLenient(String, List) - Method in class com.github.mizosoft.methanol.internal.extensions.HeadersBuilder
- setOrCancel(Flow.Subscription) - Method in class com.github.mizosoft.methanol.internal.flow.Upstream
-
Sets incoming subscription, cancels it if already set.
- SharedExecutors - Class in com.github.mizosoft.methanol.internal.concurrent
-
Provides default executors that are used across the library when no executor is supplied by the user.
- shutdown() - Method in class com.github.mizosoft.methanol.internal.concurrent.SerialExecutor
- singleton(Store) - Static method in interface com.github.mizosoft.methanol.internal.cache.InternalStorageExtension
- size() - Method in class com.github.mizosoft.methanol.HttpCache
-
Returns the size this cache occupies in bytes.
- size() - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- size() - Method in class com.github.mizosoft.methanol.internal.cache.MemoryStore
- size() - Method in interface com.github.mizosoft.methanol.internal.cache.Store
-
Returns the size in bytes of all entries in this store.
- sMaxAge() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns the value of the
s-maxagedirective if present. - snapshot() - Method in interface com.github.mizosoft.methanol.HttpCache.StatsRecorder
-
Returns a
Statssnapshot for the recorded statistics for allURIs. - snapshot(URI) - Method in interface com.github.mizosoft.methanol.HttpCache.StatsRecorder
-
Returns a
Statssnapshot for the recorded statistics of the givenURI. - sslContext() - Method in class com.github.mizosoft.methanol.Methanol
- sslContext(SSLContext) - Method in class com.github.mizosoft.methanol.Methanol.Builder
- sslParameters() - Method in class com.github.mizosoft.methanol.Methanol
- sslParameters(SSLParameters) - Method in class com.github.mizosoft.methanol.Methanol.Builder
- sslSession(SSLSession) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- staleIfError() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns the value of the
stale-if-errordirective if present. - staleIfError(Duration) - Method in class com.github.mizosoft.methanol.CacheControl.Builder
-
Sets the
stale-if-errordirective to the given duration. - staleWhileRevalidate() - Method in class com.github.mizosoft.methanol.CacheControl
-
Returns the value of the
stale-while-revalidatedirective if present. - startsWithIgnoreCase(String, String) - Static method in class com.github.mizosoft.methanol.internal.Utils
- stats() - Method in class com.github.mizosoft.methanol.HttpCache
-
Returns a snapshot of statistics accumulated so far.
- stats(URI) - Method in class com.github.mizosoft.methanol.HttpCache
-
Returns a snapshot of statistics accumulated so far for the given
URI. - statsRecorder(HttpCache.StatsRecorder) - Method in class com.github.mizosoft.methanol.HttpCache.Builder
-
Sets the cache's
StatsRecorder. - statusCode() - Method in class com.github.mizosoft.methanol.internal.extensions.ImmutableResponseInfo
- statusCode(int) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- StorageExtension - Interface in com.github.mizosoft.methanol
-
An extension that provides a storage backend for an
HttpCache. - Store - Interface in com.github.mizosoft.methanol.internal.cache
-
A repository of binary data entries each identified by a string key.
- Store.Editor - Interface in com.github.mizosoft.methanol.internal.cache
-
Writes an entry's metadata block and data stream.
- Store.EntryReader - Interface in com.github.mizosoft.methanol.internal.cache
-
A reader for an entry's data stream.
- Store.EntryWriter - Interface in com.github.mizosoft.methanol.internal.cache
-
A writer for an entry's data stream.
- Store.Viewer - Interface in com.github.mizosoft.methanol.internal.cache
-
Reads an entry's metadata block and data stream.
- StoreCorruptionException - Exception Class in com.github.mizosoft.methanol.internal.cache
- StoreCorruptionException(String) - Constructor for exception class com.github.mizosoft.methanol.internal.cache.StoreCorruptionException
- submit(T) - Method in class com.github.mizosoft.methanol.internal.flow.AbstractQueueSubscription
- submitAndComplete(T) - Method in class com.github.mizosoft.methanol.internal.flow.AbstractQueueSubscription
- submitOnNext(Flow.Subscriber, T) - Method in class com.github.mizosoft.methanol.internal.flow.AbstractSubscription
-
Submits given item to the downstream, returning
falseand cancelling on failure. - submitSilently(T) - Method in class com.github.mizosoft.methanol.internal.flow.AbstractQueueSubscription
- subscribe(Flow.Subscriber) - Method in class com.github.mizosoft.methanol.internal.extensions.HttpResponsePublisher
- subscribe(Flow.Subscriber) - Method in class com.github.mizosoft.methanol.FormBodyPublisher
- subscribe(Flow.Subscriber) - Method in class com.github.mizosoft.methanol.internal.extensions.ByteBufferBodyPublisher
- subscribe(Flow.Subscriber) - Method in class com.github.mizosoft.methanol.internal.extensions.ForwardingBodyPublisher
- subscribe(Flow.Subscriber) - Method in class com.github.mizosoft.methanol.internal.extensions.SupplierBodyPublisher
- subscribe(Flow.Subscriber) - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher
- subscribe(Flow.Subscriber) - Method in class com.github.mizosoft.methanol.WritableBodyPublisher
- subscribe(Flow.Subscriber) - Method in class com.github.mizosoft.methanol.internal.cache.CacheReadingPublisher
- subscribe(Flow.Subscriber) - Method in class com.github.mizosoft.methanol.internal.cache.CacheWritingPublisher
- subscriberOf(TypeRef, BodyAdapter.Hints) - Method in class com.github.mizosoft.methanol.AdapterCodec
-
Returns a
HttpResponse.BodySubscriberthat decodes the response body into an object of the given type. - subtractAndGetDemand(Object, VarHandle, long) - Static method in class com.github.mizosoft.methanol.internal.flow.FlowSupport
-
Subtracts given count from demand.
- subtype() - Method in class com.github.mizosoft.methanol.MediaType
-
Returns the subtype.
- supplier(ThrowingSupplier) - Static method in class com.github.mizosoft.methanol.internal.function.Unchecked
- SupplierBodyPublisher<T> - Class in com.github.mizosoft.methanol.internal.extensions
- SupplierBodyPublisher(Supplier, Function) - Constructor for class com.github.mizosoft.methanol.internal.extensions.SupplierBodyPublisher
- supplyAsync(ThrowingSupplier, Executor) - Static method in class com.github.mizosoft.methanol.internal.function.Unchecked
- supportsType(TypeRef) - Method in class com.github.mizosoft.methanol.adapter.ForwardingBodyAdapter
- supportsType(TypeRef) - Method in interface com.github.mizosoft.methanol.BodyAdapter
-
Returns
trueif this adapter supports the given type. - SYNC_EXECUTOR - Static variable in class com.github.mizosoft.methanol.internal.flow.FlowSupport
-
An executor that executes the runnable in the calling thread.
- synchronizeWrites(boolean) - Method in class com.github.mizosoft.methanol.HttpCache.Builder
-
Sets whether response completion waits for corresponding cache writes to complete.
- systemMillisUtc() - Static method in class com.github.mizosoft.methanol.internal.Utils
T
- tag(TypeRef) - Method in class com.github.mizosoft.methanol.TaggableRequest
-
Returns the tag associated with the given type if present.
- tag(TypeRef, T) - Method in class com.github.mizosoft.methanol.MutableRequest
- tag(TypeRef, T) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
-
Adds a tag mapped to the given type.
- tag(Class) - Method in class com.github.mizosoft.methanol.TaggableRequest
-
Returns the tag associated with the given type if present.
- tag(Class, T) - Method in class com.github.mizosoft.methanol.MutableRequest
- tag(Class, T) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
-
Adds a tag mapped to the given type.
- tag(Object) - Method in class com.github.mizosoft.methanol.MutableRequest
- tag(Object) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
-
Adds a tag mapped to the given object's runtime type.
- TaggableRequest - Class in com.github.mizosoft.methanol
-
An
HttpRequestthat can carry arbitrary values, referred to as tags. - TaggableRequest.Builder - Interface in com.github.mizosoft.methanol
-
An
HttpRequest.Builderthat allows attaching tags. - tagOf(HttpRequest, TypeRef) - Static method in class com.github.mizosoft.methanol.TaggableRequest
-
Returns the tag associated with the given type if the given request is a
TaggableRequestand it has a tag with the given type, otherwise returns an emptyOptional. - tagOf(HttpRequest, Class) - Static method in class com.github.mizosoft.methanol.TaggableRequest
-
Returns the tag associated with the given type if the given request is a
TaggableRequestand it has a tag with the given type, otherwise returns an emptyOptional. - TestableStore - Interface in com.github.mizosoft.methanol.internal.cache
- TEXT_ANY - Static variable in class com.github.mizosoft.methanol.MediaType
-
text/* - TEXT_HTML - Static variable in class com.github.mizosoft.methanol.MediaType
-
text/html - TEXT_MARKDOWN - Static variable in class com.github.mizosoft.methanol.MediaType
-
text/markdown - TEXT_PLAIN - Static variable in class com.github.mizosoft.methanol.MediaType
-
text/plain - TEXT_XML - Static variable in class com.github.mizosoft.methanol.MediaType
-
text/xml - textPart(String, Object) - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher.Builder
-
Adds a
text/plainform field with the given name and value. - textPart(String, Object, Charset) - Method in class com.github.mizosoft.methanol.MultipartBodyPublisher.Builder
-
Adds a
text/plainform field with the given name and value, using the given charset for encoding the field's value. - thenCompose(Function) - Method in class com.github.mizosoft.methanol.internal.concurrent.CancellationPropagatingFuture
- thenComposeAsync(Function) - Method in class com.github.mizosoft.methanol.internal.concurrent.CancellationPropagatingFuture
- thenComposeAsync(Function, Executor) - Method in class com.github.mizosoft.methanol.internal.concurrent.CancellationPropagatingFuture
- ThrowingBiConsumer<T,
U> - Interface in com.github.mizosoft.methanol.internal.function - ThrowingConsumer<T> - Interface in com.github.mizosoft.methanol.function
-
A consumer that permits throwing a checked
Exception. - ThrowingFunction<T,
R> - Interface in com.github.mizosoft.methanol.internal.function -
A
Functionthat may throw a checked exception. - ThrowingRunnable - Interface in com.github.mizosoft.methanol.internal.function
-
A
Runnablethat may throw a checked exception. - ThrowingSupplier<T> - Interface in com.github.mizosoft.methanol.internal.function
-
A
Supplierthat may throw a checked exception. - throwOnExhaustion() - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Specifies that the interceptor is to throw an
HttpRetriesExhaustedExceptionif the maximum number of retries is exceeded, with the last-thrown exception (if any) added as a suppressed exception. - timeout() - Method in class com.github.mizosoft.methanol.internal.adapter.BodyDiscardTimeoutHint
- timeout() - Method in class com.github.mizosoft.methanol.MutableRequest
- timeout(Duration) - Method in class com.github.mizosoft.methanol.MutableRequest
- timeout(Duration) - Method in class com.github.mizosoft.methanol.RetryInterceptor.Builder
-
Sets a timeout for the entire retry process.
- timeout(Duration) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
- Timeout - Class in com.github.mizosoft.methanol.internal.concurrent
- Timeout(Duration, Delayer) - Constructor for class com.github.mizosoft.methanol.internal.concurrent.Timeout
- TimeoutBodySubscriber<T> - Class in com.github.mizosoft.methanol.internal.extensions
- TimeoutBodySubscriber(HttpResponse.BodySubscriber, Duration, Delayer) - Constructor for class com.github.mizosoft.methanol.internal.extensions.TimeoutBodySubscriber
- timeoutError(long, Duration) - Method in class com.github.mizosoft.methanol.internal.extensions.TimeoutBodySubscriber
- timeoutError(long, Duration) - Method in class com.github.mizosoft.methanol.internal.flow.TimeoutSubscriber
- TimeoutSubscriber<T,
S> - Class in com.github.mizosoft.methanol.internal.flow -
A subscriber that intercepts requests to upstream and schedules error completion if each requested item isn't received within a timeout.
- TimeoutSubscriber(S, Duration, Delayer) - Constructor for class com.github.mizosoft.methanol.internal.flow.TimeoutSubscriber
- timePassed() - Method in interface com.github.mizosoft.methanol.ProgressTracker.Progress
-
Returns the time passed between this and the previous progress events.
- timePassedThreshold() - Method in class com.github.mizosoft.methanol.ProgressTracker
-
Returns the minimum time to pass for a progress event to be signalled.
- timePassedThreshold(Duration) - Method in class com.github.mizosoft.methanol.ProgressTracker.Builder
-
Sets the minimum amount of time to pass for a progress event to be signalled.
- timeRequestSent() - Method in interface com.github.mizosoft.methanol.TrackedResponse
-
Returns the time the request resulting in this response was sent.
- timeRequestSent(Instant) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- timeResponseReceived() - Method in interface com.github.mizosoft.methanol.TrackedResponse
-
Returns the time this response was received.
- timeResponseReceived(Instant) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- to(TypeRef) - Method in interface com.github.mizosoft.methanol.ResponsePayload
-
Converts this payload into an object of (possibly generic) type
T. - to(Class) - Method in interface com.github.mizosoft.methanol.ResponsePayload
-
Converts this payload into an object of type
T. - toAsync(TypeRef) - Method in interface com.github.mizosoft.methanol.ResponsePayload
-
Asynchronously converts this payload into an object of (possibly generic) type
T. - toAsync(Class) - Method in interface com.github.mizosoft.methanol.ResponsePayload
-
Asynchronously converts this payload into an object of type
T. - toBody(Object, MediaType) - Method in interface com.github.mizosoft.methanol.adapter.AbstractBodyAdapter.BaseEncoder
-
Returns a
HttpRequest.BodyPublisherthat encodes the given object into a request body using the format specified by the given media type. - toBody(Object, MediaType) - Method in class com.github.mizosoft.methanol.adapter.ForwardingEncoder
- toBody(Object, MediaType) - Method in interface com.github.mizosoft.methanol.BodyAdapter.Encoder
-
Returns a
HttpRequest.BodyPublisherthat encodes the given object into a request body using the format specified by the given media type. - toBody(T, TypeRef, BodyAdapter.Hints) - Method in interface com.github.mizosoft.methanol.adapter.AbstractBodyAdapter.BaseEncoder
- toBody(T, TypeRef, BodyAdapter.Hints) - Method in class com.github.mizosoft.methanol.adapter.ForwardingEncoder
- toBody(T, TypeRef, BodyAdapter.Hints) - Method in interface com.github.mizosoft.methanol.BodyAdapter.Encoder
-
Returns a
HttpRequest.BodyPublisherthat encodes the given object into a request body based on the givenTypeRef, using the given hintsBodyAdapter.Hintsfor encoder-specific customization. - toCompletionException(Throwable) - Static method in class com.github.mizosoft.methanol.internal.Utils
- toDeferredObject(TypeRef, MediaType) - Method in interface com.github.mizosoft.methanol.adapter.AbstractBodyAdapter.BaseDecoder
-
Returns a completed
HttpResponse.BodySubscriberthat lazily decodes the response body into an object of the given type using the format specified by the given media type. - toDeferredObject(TypeRef, MediaType) - Method in class com.github.mizosoft.methanol.adapter.ForwardingDecoder
- toDeferredObject(TypeRef, MediaType) - Method in interface com.github.mizosoft.methanol.BodyAdapter.Decoder
-
Returns a completed
HttpResponse.BodySubscriberthat lazily decodes the response body into an object of the given type using the format specified by the given media type. - toDeferredObject(TypeRef, BodyAdapter.Hints) - Method in interface com.github.mizosoft.methanol.adapter.AbstractBodyAdapter.BaseDecoder
-
Returns a completed
HttpResponse.BodySubscriberthat lazily decodes the response body into an object of the given type using the givenBodyAdapter.Hints. - toDeferredObject(TypeRef, BodyAdapter.Hints) - Method in class com.github.mizosoft.methanol.adapter.ForwardingDecoder
- toDeferredObject(TypeRef, BodyAdapter.Hints) - Method in interface com.github.mizosoft.methanol.BodyAdapter.Decoder
-
Returns a completed
HttpResponse.BodySubscriberthat lazily decodes the response body into an object of the given type using the givenBodyAdapter.Hints. - TODO() - Static method in class com.github.mizosoft.methanol.internal.Validate
- toImmutableRequest() - Method in class com.github.mizosoft.methanol.MutableRequest
-
Returns an immutable copy of this request.
- toInterruptedIOException(InterruptedException) - Static method in class com.github.mizosoft.methanol.internal.Utils
- TOKEN_MATCHER - Static variable in class com.github.mizosoft.methanol.internal.text.HttpCharMatchers
- toMap() - Method in interface com.github.mizosoft.methanol.BodyAdapter.Hints
-
Returns an immutable map of all hints.
- toObject(TypeRef, MediaType) - Method in interface com.github.mizosoft.methanol.adapter.AbstractBodyAdapter.BaseDecoder
-
Returns a
HttpResponse.BodySubscriberthat decodes the response body into an object of the given type using the format specified by the given media type. - toObject(TypeRef, MediaType) - Method in class com.github.mizosoft.methanol.adapter.ForwardingDecoder
- toObject(TypeRef, MediaType) - Method in interface com.github.mizosoft.methanol.BodyAdapter.Decoder
-
Returns a
HttpResponse.BodySubscriberthat decodes the response body into an object of the given type using the format specified by the given media type. - toObject(TypeRef, BodyAdapter.Hints) - Method in interface com.github.mizosoft.methanol.adapter.AbstractBodyAdapter.BaseDecoder
- toObject(TypeRef, BodyAdapter.Hints) - Method in class com.github.mizosoft.methanol.adapter.ForwardingDecoder
- toObject(TypeRef, BodyAdapter.Hints) - Method in interface com.github.mizosoft.methanol.BodyAdapter.Decoder
-
Returns a
HttpResponse.BodySubscriberthat decodes the response body into an object of the given type using the givenBodyAdapter.Hints. - toPublisherChain(Methanol.Interceptor.Chain, Executor) - Static method in class com.github.mizosoft.methanol.internal.extensions.Handlers
- toResponseBuilder() - Method in class com.github.mizosoft.methanol.internal.cache.CacheResponseMetadata
- toString() - Method in class com.github.mizosoft.methanol.adapter.ForwardingBodyAdapter
- toString() - Method in class com.github.mizosoft.methanol.AdapterCodec
- toString() - Method in class com.github.mizosoft.methanol.CacheControl
- toString() - Method in class com.github.mizosoft.methanol.HttpCache
- toString() - Method in class com.github.mizosoft.methanol.internal.adapter.PayloadHandlerExecutor
- toString() - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore.Hash
- toString() - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- toString() - Method in class com.github.mizosoft.methanol.internal.cache.MemoryStore
- toString() - Method in class com.github.mizosoft.methanol.internal.cache.RawResponse
- toString() - Method in class com.github.mizosoft.methanol.internal.concurrent.SerialExecutor
- toString() - Method in class com.github.mizosoft.methanol.internal.extensions.ForwardingBodyPublisher
- toString() - Method in class com.github.mizosoft.methanol.internal.extensions.ImmutableResponseInfo
- toString() - Method in class com.github.mizosoft.methanol.internal.flow.ForwardingSubscriber
- toString() - Method in class com.github.mizosoft.methanol.MediaType
-
Returns a text representation of this media type that is compatible with the value of the
Content-Typeheader. - toString() - Method in class com.github.mizosoft.methanol.MutableRequest
- toString() - Method in interface com.github.mizosoft.methanol.ProgressTracker.Progress
- toString() - Method in class com.github.mizosoft.methanol.ProgressTracker
- toString() - Method in class com.github.mizosoft.methanol.TypeRef
-
Returns a string representation for the type.
- toStringIdentityPrefix(Object) - Static method in class com.github.mizosoft.methanol.internal.Utils
- totalBytesTransferred() - Method in interface com.github.mizosoft.methanol.ProgressTracker.Progress
-
Returns the total number of bytes transferred so far.
- totalTimePassed() - Method in interface com.github.mizosoft.methanol.ProgressTracker.Progress
-
Returns the total time passed since the upload or download operation has begun.
- toUnchecked() - Method in interface com.github.mizosoft.methanol.function.ThrowingConsumer
- toUnchecked() - Method in interface com.github.mizosoft.methanol.internal.function.ThrowingBiConsumer
- toUnchecked() - Method in interface com.github.mizosoft.methanol.internal.function.ThrowingFunction
- toUnchecked() - Method in interface com.github.mizosoft.methanol.internal.function.ThrowingRunnable
- toUnchecked() - Method in interface com.github.mizosoft.methanol.internal.function.ThrowingSupplier
- toUtcDateTime(Instant) - Static method in class com.github.mizosoft.methanol.internal.cache.HttpDates
- TrackedResponse<T> - Interface in com.github.mizosoft.methanol
-
A response with recorded send/receive timestamps.
- tracking(HttpRequest.BodyPublisher, ProgressTracker.Listener) - Method in class com.github.mizosoft.methanol.ProgressTracker
-
Returns a
BodyPublisherthat tracks the givenBodyPublisher's upload progress. - tracking(HttpResponse.BodyHandler, ProgressTracker.Listener) - Method in class com.github.mizosoft.methanol.ProgressTracker
-
Returns a
BodyHandlerthat tracks the download progress of theBodySubscriberreturned by the given handler. - tracking(HttpResponse.BodySubscriber, ProgressTracker.Listener, long) - Method in class com.github.mizosoft.methanol.ProgressTracker
-
Returns a
BodySubscriberthat tracks the givenBodySubscriber's download progress. - trackingMultipart(MultipartBodyPublisher, ProgressTracker.MultipartListener) - Method in class com.github.mizosoft.methanol.ProgressTracker
-
Returns a
BodyPublisherthat tracks the givenMultipartBodyPublisher's upload progress with per-part progress events. - TRUNCATED_SHA_256 - Static variable in interface com.github.mizosoft.methanol.internal.cache.DiskStore.Hasher
-
A Hasher returning the first 80 bits of the SHA-256 of the key's UTF-8 encoded bytes.
- tryParseDeltaSeconds(String) - Static method in class com.github.mizosoft.methanol.internal.cache.HttpDates
- tryParseHttpDate(String) - Static method in class com.github.mizosoft.methanol.internal.cache.HttpDates
- type() - Method in class com.github.mizosoft.methanol.MediaType
-
Returns the general type.
- type() - Method in class com.github.mizosoft.methanol.TypeRef
-
Returns the underlying
Type. - typeArgumentAt(int) - Method in class com.github.mizosoft.methanol.TypeRef
-
Returns the type argument of
Tat the given index, provided thatTis aparameterized typethat has at least as many arguments as the given index. - typeArguments() - Method in class com.github.mizosoft.methanol.TypeRef
-
Returns a list of
TypeRef<?>corresponding toT's type arguments, provided it is aparameterized type, otherwise an empty list is returned. - TypeRef<T> - Class in com.github.mizosoft.methanol
- TypeRef() - Constructor for class com.github.mizosoft.methanol.TypeRef
U
- Unchecked - Class in com.github.mizosoft.methanol.internal.function
-
Static functions that make it easier to mix checked exceptions with lambdas.
- uncheckedCast(Object) - Method in class com.github.mizosoft.methanol.TypeRef
- underlyingClient() - Method in class com.github.mizosoft.methanol.Methanol
-
Returns the underlying
HttpClientused for sending requests. - UNSATISFIABLE - Enum constant in enum com.github.mizosoft.methanol.CacheAwareResponse.CacheStatus
-
The response was generated by the cache to serve an unsatisfiable request that prohibited network use despite being necessary to serve a valid response.
- update(CacheResponse) - Method in interface com.github.mizosoft.methanol.internal.cache.LocalCache
- update(Upstream) - Method in class com.github.mizosoft.methanol.internal.flow.Prefetcher
- upstream - Variable in class com.github.mizosoft.methanol.internal.flow.ForwardingSubscriber
- Upstream - Class in com.github.mizosoft.methanol.internal.flow
-
A one-use atomic reference to an upstream subscription.
- Upstream() - Constructor for class com.github.mizosoft.methanol.internal.flow.Upstream
- uri() - Method in class com.github.mizosoft.methanol.internal.cache.CacheResponseMetadata
- uri() - Method in class com.github.mizosoft.methanol.MutableRequest
- uri(String) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Sets this request's
URI. - uri(String) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- uri(URI) - Method in class com.github.mizosoft.methanol.MutableRequest
-
Sets this request's
URI. - uri(URI) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- uri(URI) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
- uris() - Method in class com.github.mizosoft.methanol.HttpCache
-
Returns an iterator over the
URIsof responses known to this cache. - userAgent() - Method in class com.github.mizosoft.methanol.Methanol
-
Returns this client's
User-Agent. - userAgent(String) - Method in class com.github.mizosoft.methanol.Methanol.BaseBuilder
-
Sets a default
User-Agentheader to use when sending requests. - Utils - Class in com.github.mizosoft.methanol.internal
-
Miscellaneous utilities.
V
- Validate - Class in com.github.mizosoft.methanol.internal
- value() - Method in interface com.github.mizosoft.methanol.ProgressTracker.Progress
-
Returns a double between
0and1indicating progress, orDouble.NaNif notProgressTracker.Progress.determinate(). - valueOf(String) - Static method in enum com.github.mizosoft.methanol.CacheAwareResponse.CacheStatus
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum com.github.mizosoft.methanol.CacheAwareResponse.CacheStatus
-
Returns an array containing the constants of this enum type, in the order they are declared.
- varyFields(HttpHeaders) - Static method in class com.github.mizosoft.methanol.internal.cache.CacheResponseMetadata
- version() - Method in class com.github.mizosoft.methanol.internal.extensions.ImmutableResponseInfo
- version() - Method in class com.github.mizosoft.methanol.Methanol
- version() - Method in class com.github.mizosoft.methanol.MutableRequest
- version(HttpClient.Version) - Method in class com.github.mizosoft.methanol.Methanol.Builder
- version(HttpClient.Version) - Method in class com.github.mizosoft.methanol.MutableRequest
- version(HttpClient.Version) - Method in class com.github.mizosoft.methanol.ResponseBuilder
- version(HttpClient.Version) - Method in interface com.github.mizosoft.methanol.TaggableRequest.Builder
- view(String) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- view(String) - Method in class com.github.mizosoft.methanol.internal.cache.MemoryStore
- view(String) - Method in interface com.github.mizosoft.methanol.internal.cache.Store
-
Synchronous variant of
Store.view(String, Executor). - view(String, Executor) - Method in class com.github.mizosoft.methanol.internal.cache.DiskStore
- view(String, Executor) - Method in class com.github.mizosoft.methanol.internal.cache.MemoryStore
- view(String, Executor) - Method in interface com.github.mizosoft.methanol.internal.cache.Store
-
Opens a viewer for the entry associated with the given key.
W
- with(HttpResponse.BodyHandler, HttpResponse.PushPromiseHandler) - Method in interface com.github.mizosoft.methanol.Methanol.Interceptor.Chain
-
Returns a new chain that uses given handlers, possibly targeting another response type.
- with(Consumer) - Method in class com.github.mizosoft.methanol.internal.cache.CacheResponse
- with(Consumer) - Method in class com.github.mizosoft.methanol.internal.cache.NetworkResponse
- with(Consumer) - Method in class com.github.mizosoft.methanol.internal.cache.RawResponse
- with(UnaryOperator) - Method in interface com.github.mizosoft.methanol.Methanol.Interceptor.Chain
-
Returns a new chain after applying the given function to this chain's body handler.
- with(UnaryOperator, UnaryOperator) - Method in interface com.github.mizosoft.methanol.Methanol.Interceptor.Chain
-
Returns a new chain after applying the given functions to this chain's body and push promise handlers, and only to the latter if a push promise handler is present.
- withBodyHandler(HttpResponse.BodyHandler) - Method in interface com.github.mizosoft.methanol.Methanol.Interceptor.Chain
-
Returns a new chain that uses the given
BodyHandler. - withCharset(Charset) - Method in class com.github.mizosoft.methanol.MediaType
-
Returns a new
MediaTypewith this instance's type, subtype and parameters but with the name of the given charset as the value of the charset parameter. - withinClosedRange(int, int) - Static method in interface com.github.mizosoft.methanol.internal.text.CharMatcher
- withJitter() - Method in interface com.github.mizosoft.methanol.RetryInterceptor.BackoffStrategy
- withJitter(double) - Method in interface com.github.mizosoft.methanol.RetryInterceptor.BackoffStrategy
-
Returns a
BackoffStrategythat applies full jitter to thisBackoffStrategy, where the degree of "fullness" is specified by the given factor. - withParameter(String, String) - Method in class com.github.mizosoft.methanol.MediaType
-
Returns a new
MediaTypewith this instance's type, subtype and parameters but with the value of the parameter specified by the given name set to the given value. - withParameters(Map) - Method in class com.github.mizosoft.methanol.MediaType
-
Returns a new
MediaTypewith this instance's type, subtype and parameters but with each of the given parameters' names set to their corresponding values. - withPushPromiseHandler(HttpResponse.PushPromiseHandler) - Method in interface com.github.mizosoft.methanol.Methanol.Interceptor.Chain
-
Returns a new chain that uses the given
PushPromiseHandler. - withReadTimeout(HttpResponse.BodyHandler, Duration) - Static method in class com.github.mizosoft.methanol.MoreBodyHandlers
-
Returns a
BodyHandlerthat returns a subscriber obtained fromMoreBodySubscribers.withReadTimeout(BodySubscriber, Duration). - withReadTimeout(HttpResponse.BodyHandler, Duration, ScheduledExecutorService) - Static method in class com.github.mizosoft.methanol.MoreBodyHandlers
-
Returns a
BodyHandlerthat returns a subscriber obtained fromMoreBodySubscribers.withReadTimeout(BodySubscriber, Duration, ScheduledExecutorService). - withReadTimeout(HttpResponse.BodySubscriber, Duration) - Static method in class com.github.mizosoft.methanol.MoreBodySubscribers
-
Returns a
BodySubscriberthat completes the given downstream withHttpReadTimeoutExceptionif a requested signal is not received within the given timeout. - withReadTimeout(HttpResponse.BodySubscriber, Duration, ScheduledExecutorService) - Static method in class com.github.mizosoft.methanol.MoreBodySubscribers
-
Returns a
BodySubscriberthat completes the given downstream withHttpReadTimeoutExceptionif a requested signal is not received within the given timeout. - WritableBodyPublisher - Class in com.github.mizosoft.methanol
-
A
BodyPublisherthat allows streaming the body's content through anOutputStreamor aWritableByteChannel. - write(ByteBuffer) - Method in interface com.github.mizosoft.methanol.internal.cache.Store.EntryWriter
-
Synchronous variant of
Store.EntryWriter.write(ByteBuffer, Executor). - write(ByteBuffer, Executor) - Method in interface com.github.mizosoft.methanol.internal.cache.Store.EntryWriter
-
Writes all the bytes from the given buffer into the editor's data stream, and returns the number of bytes actually written.
- write(List) - Method in interface com.github.mizosoft.methanol.internal.cache.Store.EntryWriter
-
Synchronous variant of
Store.EntryWriter.write(List, Executor). - write(List, Executor) - Method in interface com.github.mizosoft.methanol.internal.cache.Store.EntryWriter
-
Writes all the bytes from the given buffers into the editor's data stream, in sequential order, and returns the number of bytes actually written.
- writeFailureCount() - Method in interface com.github.mizosoft.methanol.HttpCache.Stats
-
Returns the number of times a response wasn't written to cache due to a write failure.
- writer() - Method in interface com.github.mizosoft.methanol.internal.cache.Store.Editor
-
Returns the writer associated with this editor, which is at most one.
- writeSuccessCount() - Method in interface com.github.mizosoft.methanol.HttpCache.Stats
-
Returns the number of times a response was successfully written to cache.
- writingWith(Store.Editor, Executor, CacheWritingPublisher.Listener, boolean) - Method in class com.github.mizosoft.methanol.internal.cache.NetworkResponse
All Classes and Interfaces|All Packages|Serialized Form
TypeRef.of(Class)