public class SingleStream<T>
Abstract class containing communication streams for client status events.
public SingleStream(@NotNull kotlin.coroutines.CoroutineContext coroutineContext, @Nullable UnhandledError thrown)
Abstract class containing communication streams for client status events.
coroutineContext
- the context that will be used for any coroutine calls within the receiver.thrown
- an optional error that if present will close the event Channel and complete the error Channel.@NotNull public kotlinx.coroutines.channels.Channel<T> getEvents()
will emit received class PaymentServiceStatus
class PaymentServiceStatus
@NotNull public kotlinx.coroutines.CompletableDeferred<com.worldpay.error.UnhandledError> getError()
may complete with an exception UnhandledError
if there is a problem.
exception UnhandledError
public void close(@Nullable UnhandledError thrown)
Attempts to normally close down this payment stream.
@NotNull public kotlin.coroutines.CoroutineContext getCoroutineContext()
the context that will be used for any coroutine calls within the receiver.