public abstract class ChannelStream<IN,OUT> extends Stream<IN> implements ReactorChannel<IN,OUT>
ReactorChannel
implementation that handles the basic interaction and behave as a Stream
.ReactorChannel.ConsumerSpec
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
Modifier | Constructor and Description |
---|---|
protected |
ChannelStream(Environment env,
Codec<Buffer,IN,OUT> codec,
long prefetch,
Dispatcher eventsDispatcher) |
Modifier and Type | Method and Description |
---|---|
abstract Object |
delegate() |
protected abstract void |
doDecoded(IN in) |
protected abstract void |
doSubscribeWriter(org.reactivestreams.Publisher<? extends OUT> writer,
org.reactivestreams.Subscriber<? super Void> postWriter) |
long |
getCapacity()
Return defined element capacity, used to drive new
Subscription
request needs. |
Function<Buffer,IN> |
getDecoder() |
Dispatcher |
getDispatcher()
Get the dispatcher used to execute signals on this Stream instance.
|
Function<OUT,Buffer> |
getEncoder() |
Environment |
getEnvironment()
Get the assigned
Environment . |
Stream<Void> |
writeBufferWith(org.reactivestreams.Publisher<? extends Buffer> source)
Write Buffer directly to be encoded if any codec has been setup
|
Stream<Void> |
writeWith(org.reactivestreams.Publisher<? extends OUT> source)
Send data to the peer, listen for any error on write and close on terminal signal (complete|error).
|
adaptiveConsume, adaptiveConsumeOn, after, batchConsume, batchConsumeOn, broadcast, broadcastOn, broadcastTo, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, cache, cancelSubscription, capacity, cast, combine, concatMap, concatWith, consume, consume, consume, consume, consume, consumeLater, consumeOn, consumeOn, consumeOn, count, count, decode, defaultIfEmpty, dematerialize, dispatchOn, dispatchOn, dispatchOn, distinct, distinct, distinctUntilChanged, distinctUntilChanged, downstreamSubscription, elapsed, elementAt, elementAtOrDefault, encode, env, exists, fanIn, filter, filter, finallyDo, flatMap, getTimer, groupBy, ignoreError, ignoreError, isReactivePull, join, joinWith, keepAlive, last, lift, log, log, map, materialize, merge, mergeWith, nest, next, observe, observeCancel, observeComplete, observeError, observeStart, observeSubscribe, onErrorResumeNext, onErrorResumeNext, onErrorReturn, onErrorReturn, onOverflowBuffer, onOverflowBuffer, onOverflowDrop, partition, partition, process, recover, reduce, reduce, repeat, repeat, repeatWhen, requestWhen, retry, retry, retry, retry, retryWhen, sample, sample, sample, sample, sample, sample, sampleFirst, sampleFirst, sampleFirst, sampleFirst, sampleFirst, sampleFirst, scan, scan, skip, skip, skip, skipWhile, skipWhile, sort, sort, sort, sort, split, split, startWith, startWith, startWith, subscribe, subscribeOn, subscribeOn, subscribeOn, switchMap, take, take, take, takeWhile, tap, throttle, throttle, timeout, timeout, timeout, timeout, timestamp, toBlockingQueue, toBlockingQueue, toList, toList, toString, unbounded, when, window, window, window, window, window, window, window, window, window, window, window, zip, zipWith, zipWith
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
on, remoteAddress
protected ChannelStream(Environment env, Codec<Buffer,IN,OUT> codec, long prefetch, Dispatcher eventsDispatcher)
public final Stream<Void> writeWith(org.reactivestreams.Publisher<? extends OUT> source)
ReactorChannel
writeWith
in interface ReactorChannel<IN,OUT>
source
- the dataStream publishing OUT items to write on this channelpublic final Stream<Void> writeBufferWith(org.reactivestreams.Publisher<? extends Buffer> source)
source
- the raw source to encodewriteWith(Publisher)
public final Environment getEnvironment()
Stream
Environment
.getEnvironment
in class Stream<IN>
Environment
public final Dispatcher getDispatcher()
Stream
getDispatcher
in class Stream<IN>
public final long getCapacity()
NonBlocking
Subscription
request needs. This is the maximum in-flight data allowed to transit to this elements.getCapacity
in interface NonBlocking
getCapacity
in class Stream<IN>
public abstract Object delegate()
protected abstract void doSubscribeWriter(org.reactivestreams.Publisher<? extends OUT> writer, org.reactivestreams.Subscriber<? super Void> postWriter)
protected abstract void doDecoded(IN in)
Copyright © 2017. All rights reserved.