public class LaunchLoggingContext
extends java.lang.Object
ConcurrentHashMap context for launch logging and converts
SaveLogRQ to multipart HTTP request to ReportPortal
Basic flow:
After start some launch context should be initialized with observable of
launch ID and ReportPortal client.
Before actual finish of launch, context should be closed/completed.
Context consists of Flowable with buffering back-pressure strategy to be able
to batch incoming log messages into one request| Modifier and Type | Method and Description |
|---|---|
static io.reactivex.Completable |
complete()
Completes context attached to the current thread
|
static LaunchLoggingContext |
context(java.lang.String key) |
static LaunchLoggingContext |
init(io.reactivex.Maybe<java.lang.String> launchUuid,
ReportPortalClient client,
io.reactivex.Scheduler scheduler,
ListenerParameters parameters)
Initializes new logging context and attaches it to current thread
|
static LaunchLoggingContext |
init(io.reactivex.Maybe<java.lang.String> launchUuid,
ReportPortalClient client,
io.reactivex.Scheduler scheduler,
ListenerParameters parameters,
io.reactivex.FlowableSubscriber<com.epam.ta.reportportal.ws.model.BatchSaveOperatingRS> loggingSubscriber)
Initializes new logging context and attaches it to current thread
|
@Nullable public static LaunchLoggingContext context(@Nonnull java.lang.String key)
public static LaunchLoggingContext init(@Nonnull io.reactivex.Maybe<java.lang.String> launchUuid, @Nonnull ReportPortalClient client, @Nonnull io.reactivex.Scheduler scheduler, @Nonnull ListenerParameters parameters, @Nonnull io.reactivex.FlowableSubscriber<com.epam.ta.reportportal.ws.model.BatchSaveOperatingRS> loggingSubscriber)
launchUuid - a UUID of a Launchclient - Client of ReportPortalscheduler - a Scheduler to use with this LoggingContextparameters - ReportPortal client configuration parametersloggingSubscriber - RxJava subscriber on logging resultspublic static LaunchLoggingContext init(@Nonnull io.reactivex.Maybe<java.lang.String> launchUuid, @Nonnull ReportPortalClient client, @Nonnull io.reactivex.Scheduler scheduler, @Nonnull ListenerParameters parameters)
launchUuid - a UUID of a Launchclient - Client of ReportPortalscheduler - a Scheduler to use with this LoggingContextparameters - ReportPortal client configuration parameterspublic static io.reactivex.Completable complete()