IN - The type that will be received by this serverOUT - The type that will be sent by this serverpublic abstract class HttpServer<IN,OUT> extends PeerStream<IN,OUT,HttpChannel<IN,OUT>> implements Server<IN,OUT,HttpChannel<IN,OUT>>
| Modifier and Type | Field and Description |
|---|---|
protected reactor.bus.registry.Registry<reactor.fn.Function<HttpChannel<IN,OUT>,? extends org.reactivestreams.Publisher<? extends OUT>>> |
routedWriters |
channels, prefetch| Modifier | Constructor and Description |
|---|---|
protected |
HttpServer(reactor.Environment env,
reactor.core.Dispatcher dispatcher,
reactor.io.codec.Codec<reactor.io.buffer.Buffer,IN,OUT> codec) |
| Modifier and Type | Method and Description |
|---|---|
HttpServer<IN,OUT> |
delete(java.lang.String path,
reactor.fn.Function<HttpChannel<IN,OUT>,? extends org.reactivestreams.Publisher<? extends OUT>> handler) |
HttpServer<IN,OUT> |
get(java.lang.String path,
reactor.fn.Function<HttpChannel<IN,OUT>,? extends org.reactivestreams.Publisher<? extends OUT>> handler) |
Server<IN,OUT,HttpChannel<IN,OUT>> |
pipeline(reactor.fn.Function<HttpChannel<IN,OUT>,? extends org.reactivestreams.Publisher<? extends OUT>> serviceFunction)
A global handling pipeline that will be called on each new connection and will listen for signals emitted
by the returned Publisher to write back.
|
HttpServer<IN,OUT> |
post(java.lang.String path,
reactor.fn.Function<HttpChannel<IN,OUT>,? extends org.reactivestreams.Publisher<? extends OUT>> handler) |
HttpServer<IN,OUT> |
put(java.lang.String path,
reactor.fn.Function<HttpChannel<IN,OUT>,? extends org.reactivestreams.Publisher<? extends OUT>> handler) |
HttpServer<IN,OUT> |
route(reactor.bus.selector.Selector condition,
reactor.fn.Function<HttpChannel<IN,OUT>,? extends org.reactivestreams.Publisher<? extends OUT>> serviceFunction) |
protected java.lang.Iterable<org.reactivestreams.Publisher<? extends OUT>> |
routeChannel(HttpChannel<IN,OUT> ch) |
addWritePublisher, bindChannel, completeConsumer, createAdaptiveDemandMapper, createBatchAction, createErrorConsumer, doPipeline, getDefaultCodec, getDispatcher, getEnvironment, getPrefetchSize, mergeWrite, notifyError, notifyNewChannel, notifyShutdown, subscribe, subscribeChannelHandlersadaptiveConsume, adaptiveConsumeOn, batchConsume, batchConsumeOn, broadcast, broadcastOn, broadcastTo, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, cache, capacity, cast, cleanSubscriptionReference, combine, concatMap, concatWith, consume, consume, consume, consume, consume, consumeLater, consumeOn, consumeOn, consumeOn, count, count, defaultIfEmpty, dematerialize, dispatchOn, dispatchOn, dispatchOn, distinct, distinct, distinctUntilChanged, distinctUntilChanged, downstreamSubscription, elapsed, elementAt, elementAtOrDefault, env, exists, fanIn, filter, filter, finallyDo, flatMap, getCapacity, getTimer, groupBy, ignoreErrors, ignoreErrors, isReactivePull, join, joinWith, keepAlive, last, lift, log, log, map, materialize, merge, mergeWith, nest, next, notify, notify, observe, observeCancel, observeComplete, observeError, observeSubscribe, onErrorResumeNext, onErrorResumeNext, onErrorReturn, onErrorReturn, onOverflowBuffer, onOverflowBuffer, onOverflowDrop, partition, partition, 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, takeWhile, tap, throttle, throttle, timeout, timeout, timeout, timeout, timestamp, toBlockingQueue, toBlockingQueue, toList, toList, toString, when, window, window, window, window, window, window, window, window, window, window, window, zip, zipWith, zipWithprotected final reactor.bus.registry.Registry<reactor.fn.Function<HttpChannel<IN,OUT>,? extends org.reactivestreams.Publisher<? extends OUT>>> routedWriters
public HttpServer<IN,OUT> route(reactor.bus.selector.Selector condition, reactor.fn.Function<HttpChannel<IN,OUT>,? extends org.reactivestreams.Publisher<? extends OUT>> serviceFunction)
condition - serviceFunction - public Server<IN,OUT,HttpChannel<IN,OUT>> pipeline(reactor.fn.Function<HttpChannel<IN,OUT>,? extends org.reactivestreams.Publisher<? extends OUT>> serviceFunction)
Serverpublic final HttpServer<IN,OUT> get(java.lang.String path, reactor.fn.Function<HttpChannel<IN,OUT>,? extends org.reactivestreams.Publisher<? extends OUT>> handler)
path - handler - public final HttpServer<IN,OUT> post(java.lang.String path, reactor.fn.Function<HttpChannel<IN,OUT>,? extends org.reactivestreams.Publisher<? extends OUT>> handler)
path - handler - public final HttpServer<IN,OUT> put(java.lang.String path, reactor.fn.Function<HttpChannel<IN,OUT>,? extends org.reactivestreams.Publisher<? extends OUT>> handler)
path - handler - public final HttpServer<IN,OUT> delete(java.lang.String path, reactor.fn.Function<HttpChannel<IN,OUT>,? extends org.reactivestreams.Publisher<? extends OUT>> handler)
path - handler - protected java.lang.Iterable<org.reactivestreams.Publisher<? extends OUT>> routeChannel(HttpChannel<IN,OUT> ch)
routeChannel in class PeerStream<IN,OUT,HttpChannel<IN,OUT>>