Uses of Interface
io.helidon.common.reactive.Single
-
Packages that use Single Package Description io.helidon.common.http HTTP APIs and implementations usable by both server and client side of the HTTP story.io.helidon.common.reactive Common reactive library for Helidon projects.io.helidon.dbclient Reactive Database API for Helidon.io.helidon.dbclient.common Helper classes to use in various implementations.io.helidon.dbclient.mongodb Helidon DB integration for reactive mongoDB.io.helidon.dbclient.tracing Tracing support for Helidon DB.io.helidon.media.common Common classes for processing content with a specificMediaType.io.helidon.media.multipart Helidon Media MultiPart.io.helidon.webclient A reactive client for rest calls.io.helidon.webclient.metrics Client metrics service.io.helidon.webclient.security Client service propagation service.io.helidon.webclient.spi This package provides extensibility for theWebClient.io.helidon.webclient.tracing Client tracing propagation service.io.helidon.webserver Reactive web server API. -
-
Uses of Single in io.helidon.common.http
Methods in io.helidon.common.http that return Single Modifier and Type Method Description <T> Single<T>Content. as(Class<T> type)Deprecated.Consumes and converts the request content into a completion stage of the requested type. -
Uses of Single in io.helidon.common.reactive
Classes in io.helidon.common.reactive that implement Single Modifier and Type Class Description classCompletionSingle<T>Single as CompletionStage.Methods in io.helidon.common.reactive that return Single Modifier and Type Method Description Single<T>CompletionSingle. cancel()default Single<T>Single. cancel()Cancel upstream.default <U> Single<U>Multi. collect(Collector<T,U> collector)default <U> Single<U>Multi. collect(Supplier<? extends U> collectionSupplier, BiConsumer<U,T> accumulator)default Single<List<T>>Multi. collectList()default <A,R>
Single<R>Multi. collectStream(Collector<T,A,R> collector)Collects up upstream items with the help of a the callbacks of aCollector.default <U> Single<U>Single. compose(Function<? super Single<T>,? extends Single<? extends U>> composer)Apply the givencomposerfunction to the currentSingleinstance and return theSinglereturned by this function.static <T> Single<T>Single. create(Single<T> single)static <T> Single<T>Single. create(CompletionStage<T> completionStage)Wrap a CompletionStage into a Multi and signal its outcome non-blockingly.static <T> Single<T>Single. create(CompletionStage<T> completionStage, boolean nullMeansEmpty)Wrap a CompletionStage into a Multi and signal its outcome non-blockingly.static <T> Single<T>Single. create(Flow.Publisher<T> source)Create aSingleinstance that publishes the first and only item received from the given publisher.default Single<T>Single. defaultIfEmpty(T defaultItem)Signals the default item if the upstream is empty.static <T> Single<T>Single. defer(Supplier<? extends Single<? extends T>> supplier)Call the given supplier function for each individual downstream Subscriber to return a Flow.Publisher to subscribe to.static <T> Single<T>Single. empty()Get aSingleinstance that completes immediately.static <T> Single<T>Single. error(Throwable error)Create aSingleinstance that reports the given given exception to its subscriber(s).default Single<T>Multi. first()default <U> Single<U>Single. flatMapSingle(Function<? super T,? extends Single<? extends U>> mapper)default Single<Void>Multi. forEach(Consumer<? super T> consumer)Terminal stage, invokes provided consumer for every item in the stream.static <T> Single<T>Single. from(Single<T> single)Deprecated.usecreate(io.helidon.common.reactive.Single)insteadstatic <T> Single<T>Single. from(CompletionStage<T> completionStage)Deprecated.usecreate(java.util.concurrent.CompletionStage)insteadstatic <T> Single<T>Single. from(CompletionStage<T> completionStage, boolean nullMeansEmpty)Deprecated.static <T> Single<T>Single. from(Flow.Publisher<T> source)Deprecated.usecreate(java.util.concurrent.Flow.Publisher)insteadstatic <T> Single<T>Single. just(T item)Create aSingleinstance that publishes the given item to its subscriber(s).default <U> Single<U>Single. map(Function<? super T,? extends U> mapper)static <T> Single<T>Single. never()Get aSingleinstance that never completes.default Single<T>Single. observeOn(Executor executor)Re-emit the upstream's signals to the downstream on the given executor's thread.Single<T>CompletionSingle. onCancel(Runnable onCancel)default Single<T>Single. onCancel(Runnable onCancel)Executes givenRunnablewhen a cancel signal is received.default Single<T>Single. onComplete(Runnable onComplete)Executes givenRunnablewhen onComplete signal is received.default Single<T>Single. onError(Consumer<? super Throwable> onErrorConsumer)Executes givenRunnablewhen onError signal is received.default Single<T>Single. onErrorResume(Function<? super Throwable,? extends T> onError)Functionproviding one item to be submitted as onNext in case of onError signal is received.default Single<T>Single. onErrorResumeWithSingle(Function<? super Throwable,? extends Single<? extends T>> onError)Resume stream from supplied publisher if onError signal is intercepted.default Single<T>Single. onTerminate(Runnable onTerminate)Executes givenRunnablewhen any of signals onComplete, onCancel or onError is received.default Single<T>Single. peek(Consumer<? super T> consumer)Invoke provided consumer for the item in stream.default Single<T>Multi. reduce(BiFunction<T,T,T> reducer)Combine subsequent items via a callback function and emit the final value result as a Single.default <R> Single<R>Multi. reduce(Supplier<? extends R> supplier, BiFunction<R,T,R> reducer)Combine every upstream item with an accumulator value to produce a new accumulator value and emit the final accumulator value as a Single.default Single<T>Single. retry(long count)Retry a failing upstream at most the given number of times before giving up.default Single<T>Single. retry(BiPredicate<? super Throwable,? super Long> predicate)Retry a failing upstream if the predicate returns true.default <U> Single<T>Single. retryWhen(BiFunction<? super Throwable,? super Long,? extends Flow.Publisher<U>> whenFunction)Retry a failing upstream when the given function returns a publisher that signals an item.default Single<T>Single. switchIfEmpty(Single<T> other)Switch to the other Single if the upstream is empty.default <U> Single<T>Single. takeUntil(Flow.Publisher<U> other)Relay upstream items until the other source signals an item or completes.default Single<T>Single. timeout(long timeout, TimeUnit unit, ScheduledExecutorService executor)Signals aTimeoutExceptionif the upstream doesn't signal an item, error or completion within the specified time.default Single<T>Single. timeout(long timeout, TimeUnit unit, ScheduledExecutorService executor, Single<T> fallback)Switches to a fallback single if the upstream doesn't signal an item, error or completion within the specified time.static Single<Long>Single. timer(long time, TimeUnit unit, ScheduledExecutorService executor)Signal 0L and complete the sequence after the given time elapsed.default Single<Optional<T>>Single. toOptionalSingle()Methods in io.helidon.common.reactive with parameters of type Single Modifier and Type Method Description static <T> Multi<T>Multi. create(Single<T> single)static <T> Single<T>Single. create(Single<T> single)static <T> Multi<T>Multi. from(Single<T> single)Deprecated.useMulti.create(io.helidon.common.reactive.Single)insteadstatic <T> Single<T>Single. from(Single<T> single)Deprecated.usecreate(io.helidon.common.reactive.Single)insteaddefault Single<T>Single. switchIfEmpty(Single<T> other)Switch to the other Single if the upstream is empty.default Single<T>Single. timeout(long timeout, TimeUnit unit, ScheduledExecutorService executor, Single<T> fallback)Switches to a fallback single if the upstream doesn't signal an item, error or completion within the specified time.Method parameters in io.helidon.common.reactive with type arguments of type Single Modifier and Type Method Description default <U> Single<U>Single. compose(Function<? super Single<T>,? extends Single<? extends U>> composer)Apply the givencomposerfunction to the currentSingleinstance and return theSinglereturned by this function.default <U> Single<U>Single. compose(Function<? super Single<T>,? extends Single<? extends U>> composer)Apply the givencomposerfunction to the currentSingleinstance and return theSinglereturned by this function.static <T> Single<T>Single. defer(Supplier<? extends Single<? extends T>> supplier)Call the given supplier function for each individual downstream Subscriber to return a Flow.Publisher to subscribe to.default <U> Single<U>Single. flatMapSingle(Function<? super T,? extends Single<? extends U>> mapper)default Single<T>Single. onErrorResumeWithSingle(Function<? super Throwable,? extends Single<? extends T>> onError)Resume stream from supplied publisher if onError signal is intercepted.default <U> USingle. to(Function<? super Single<T>,? extends U> converter)Apply the givenconverterfunction to the currentSingleinstance and return the value returned by this function. -
Uses of Single in io.helidon.dbclient
Methods in io.helidon.dbclient that return Single Modifier and Type Method Description default Single<Long>DbExecute. delete(String statement, Object... parameters)Create and execute delete statement using a statement passed as an argument.default Single<Long>DbExecute. dml(String statement, Object... parameters)Create and execute data modification statement using a statement passed as an argument.default Single<Optional<DbRow>>DbExecute. get(String statement, Object... parameters)Create and execute a database query using a statement passed as an argument.default Single<Long>DbExecute. insert(String statement, Object... parameters)Create and execute insert statement using a statement passed as an argument.default Single<Long>DbExecute. namedDelete(String statementName, Object... parameters)Create and execute delete statement using a statement defined in the configuration file.default Single<Long>DbExecute. namedDml(String statementName, Object... parameters)Create and execute a data modification statement using a statement defined in the configuration file.default Single<Optional<DbRow>>DbExecute. namedGet(String statementName, Object... parameters)Create and execute a database query using a statement defined in the configuration file.default Single<Long>DbExecute. namedInsert(String statementName, Object... parameters)Create and execute insert statement using a statement defined in the configuration file.default Single<Long>DbExecute. namedUpdate(String statementName, Object... parameters)Create and execute update statement using a statement defined in the configuration file.Single<Void>DbClient. ping()Pings the database, completes when DB is up and ready, completes exceptionally if not.Single<DbClientServiceContext>DbClientService. statement(DbClientServiceContext context)Statement execution to be intercepted.default Single<Long>DbExecute. update(String statement, Object... parameters)Create and execute update statement using a statement passed as an argument. -
Uses of Single in io.helidon.dbclient.common
Methods in io.helidon.dbclient.common that return Single Modifier and Type Method Description protected abstract Single<DbClientServiceContext>DbClientServiceBase. apply(DbClientServiceContext context)This method is only invoked if the predicate for this service was passed.Single<DbClientServiceContext>DbClientContext. invokeServices(DbClientServiceContext dbContext)Invoke all configured client services and return a single that completes once all the client services complete.Single<DbClientServiceContext>DbClientServiceBase. statement(DbClientServiceContext context)Methods in io.helidon.dbclient.common with parameters of type Single Modifier and Type Method Description protected abstract RAbstractStatement. doExecute(Single<DbClientServiceContext> dbContext, CompletableFuture<Void> statementFuture, CompletableFuture<Long> queryFuture)Execute the statement against the database. -
Uses of Single in io.helidon.dbclient.mongodb
Methods in io.helidon.dbclient.mongodb that return Single Modifier and Type Method Description protected Single<Long>MongoDbStatementDml. doExecute(Single<DbClientServiceContext> dbContext, CompletableFuture<Void> statementFuture, CompletableFuture<Long> queryFuture)Single<Long>MongoDbStatementDml. execute()Single<Optional<DbRow>>MongoDbStatementGet. execute()Single<Void>MongoDbClient. ping()Methods in io.helidon.dbclient.mongodb with parameters of type Single Modifier and Type Method Description protected Single<Long>MongoDbStatementDml. doExecute(Single<DbClientServiceContext> dbContext, CompletableFuture<Void> statementFuture, CompletableFuture<Long> queryFuture) -
Uses of Single in io.helidon.dbclient.tracing
Methods in io.helidon.dbclient.tracing that return Single Modifier and Type Method Description protected Single<DbClientServiceContext>DbClientTracing. apply(DbClientServiceContext serviceContext) -
Uses of Single in io.helidon.media.common
Methods in io.helidon.media.common that return Single Modifier and Type Method Description <T> Single<T>MessageBodyReadableContent. as(GenericType<T> type)Consumes and converts the content payload into a completion stage of the requested type.<T> Single<T>MessageBodyReadableContent. as(Class<T> type)<U extends T>
Single<U>MessageBodyReader. read(Flow.Publisher<DataChunk> publisher, GenericType<U> type, MessageBodyReaderContext context)Convert a HTTP payload into a Single publisher of the given type.static Single<byte[]>ContentReaders. readBytes(Flow.Publisher<DataChunk> chunks)Collect theDataChunkof the given publisher into a single byte array.static Single<String>ContentReaders. readString(Flow.Publisher<DataChunk> chunks, Charset charset)static Single<String>ContentReaders. readURLEncodedString(Flow.Publisher<DataChunk> chunks, Charset charset)<T> Single<T>MessageBodyReaderContext. unmarshall(Flow.Publisher<DataChunk> payload, GenericType<T> type)Convert a given HTTP payload into a publisher by selecting a reader that accepts the specified type and current context.<T> Single<T>MessageBodyReaderContext. unmarshall(Flow.Publisher<DataChunk> payload, MessageBodyReader<T> reader, GenericType<T> type)Convert a given HTTP payload into a publisher by selecting a reader with the specified class.static Single<DataChunk>ContentWriters. writeBytes(byte[] bytes, boolean copy)static Single<DataChunk>ContentWriters. writeCharBuffer(CharBuffer buffer, Charset charset)static Single<DataChunk>ContentWriters. writeCharSequence(CharSequence cs, Charset charset)static Single<DataChunk>ContentWriters. writeStackTrace(Throwable throwable, Charset charset)Methods in io.helidon.media.common with parameters of type Single Modifier and Type Method Description <T> Flow.Publisher<DataChunk>MessageBodyWriterContext. marshall(Single<T> content, GenericType<T> type)Convert a given input publisher into HTTP payload by selecting a writer that accepts the specified type and current context.<T> Flow.Publisher<DataChunk>MessageBodyWriterContext. marshall(Single<T> content, MessageBodyWriter<T> writer, GenericType<T> type)Convert a given input publisher into HTTP payload by selecting a writer with the specified class.Flow.Publisher<DataChunk>MessageBodyWriter. write(Single<? extends T> single, GenericType<? extends T> type, MessageBodyWriterContext context)Generate HTTP payload from the objects of the given type. -
Uses of Single in io.helidon.media.multipart
Methods in io.helidon.media.multipart that return Single Modifier and Type Method Description <U extends MultiPart>
Single<U>MultiPartBodyReader. read(Flow.Publisher<DataChunk> publisher, GenericType<U> type, MessageBodyReaderContext context)Methods in io.helidon.media.multipart with parameters of type Single Modifier and Type Method Description Flow.Publisher<DataChunk>MultiPartBodyWriter. write(Single<? extends WriteableMultiPart> content, GenericType<? extends WriteableMultiPart> type, MessageBodyWriterContext context) -
Uses of Single in io.helidon.webclient
Methods in io.helidon.webclient that return Single Modifier and Type Method Description Single<Void>WebClientResponse. close()Asynchronous close of the response.Single<WebClientResponse>WebClientRequestBuilder. request()Performs prepared request without expecting to receive any specific type.<T> Single<T>WebClientRequestBuilder. request(GenericType<T> responseType)Performs prepared request and transforms response to requested type.<T> Single<T>WebClientRequestBuilder. request(Class<T> responseType)Performs prepared request and transforms response to requested type.Single<WebClientResponse>WebClientRequestBuilder. submit()Performs prepared request.Single<WebClientResponse>WebClientRequestBuilder. submit(Object requestEntity)Performs prepared request and submitting request entity.<T> Single<T>WebClientRequestBuilder. submit(Object requestEntity, Class<T> responseType)Performs prepared request and submitting request entity.Single<WebClientResponse>WebClientRequestBuilder. submit(Flow.Publisher<DataChunk> requestEntity)Performs prepared request and submitting request entity usingFlow.Publisher.<T> Single<T>WebClientRequestBuilder. submit(Flow.Publisher<DataChunk> requestEntity, Class<T> responseType)Performs prepared request and submitting request entity usingFlow.Publisher.Single<WebClientServiceResponse>WebClientServiceRequest. whenComplete()Completes when the full processing of this request is done (e.g.Single<WebClientServiceResponse>WebClientServiceRequest. whenResponseReceived()Completes when the response headers has been received, but entity has not been processed yet.Single<WebClientServiceRequest>WebClientServiceRequest. whenSent()Completes when the request part of this request is done (e.g. -
Uses of Single in io.helidon.webclient.metrics
Methods in io.helidon.webclient.metrics that return Single Modifier and Type Method Description Single<WebClientServiceRequest>WebClientMeter. request(WebClientServiceRequest request)Single<WebClientServiceRequest>WebClientMetrics. request(WebClientServiceRequest request)Single<WebClientServiceResponse>WebClientMetrics. response(WebClientRequestBuilder.ClientRequest request, WebClientServiceResponse response) -
Uses of Single in io.helidon.webclient.security
Methods in io.helidon.webclient.security that return Single Modifier and Type Method Description Single<WebClientServiceRequest>WebClientSecurity. request(WebClientServiceRequest request) -
Uses of Single in io.helidon.webclient.spi
Methods in io.helidon.webclient.spi that return Single Modifier and Type Method Description Single<WebClientServiceRequest>WebClientService. request(WebClientServiceRequest request)Method which is called before send actual request.default Single<WebClientServiceResponse>WebClientService. response(WebClientRequestBuilder.ClientRequest request, WebClientServiceResponse response)Method which is called when the last byte of the response is processed. -
Uses of Single in io.helidon.webclient.tracing
Methods in io.helidon.webclient.tracing that return Single Modifier and Type Method Description Single<WebClientServiceRequest>WebClientTracing. request(WebClientServiceRequest request) -
Uses of Single in io.helidon.webserver
Methods in io.helidon.webserver that return Single Modifier and Type Method Description Single<ResponseHeaders>ResponseHeaders. send()Send headers and status code to the client.Single<ServerResponse>ServerResponse. send()Sends an empty response.Single<ServerResponse>ServerResponse. send(Flow.Publisher<DataChunk> content)Send a message as is without any other marshalling.<T> Single<ServerResponse>ServerResponse. send(Flow.Publisher<T> content, Class<T> clazz)Send a message with the given entity stream as content and close the response.<T> Single<ServerResponse>ServerResponse. send(T content)Send a message and close the response.Single<WebServer>WebServer. shutdown()Attempt to gracefully shutdown server.Single<WebServer>WebServer. start()Starts the server.Single<BareResponse>BareResponse. whenCompleted()Returns aSingleof this response.Single<BareResponse>BareResponse. whenHeadersCompleted()Returns aSingleof headers part of this response.default Single<ResponseHeaders>ResponseHeaders. whenSend()Deprecated.since 2.0.0, please useResponseHeaders.whenSent()Single<ResponseHeaders>ResponseHeaders. whenSent()Returns aSinglewhich is completed when all headers are sent to the client.Single<ServerResponse>ServerResponse. whenSent()Completion stage is completed when response is completed.Single<WebServer>WebServer. whenShutdown()Completion stage is completed when server is shut down.
-