IN - the type of the received dataOUT - the type of replied dataCONN - the channel implementationpublic abstract class ReactorClient<IN,OUT,CONN extends ChannelStream<IN,OUT>> extends ReactorPeer<IN,OUT,CONN>
ReactorChannelHandler passed.| Modifier and Type | Field and Description |
|---|---|
static ReactorChannelHandler |
PING |
started| Modifier | Constructor and Description |
|---|---|
protected |
ReactorClient(reactor.Environment defaultEnv,
reactor.core.Dispatcher defaultDispatcher,
reactor.io.codec.Codec<reactor.io.buffer.Buffer,IN,OUT> codec,
long prefetch) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract reactor.rx.Stream<reactor.fn.tuple.Tuple2<java.net.InetSocketAddress,java.lang.Integer>> |
doStart(ReactorChannelHandler<IN,OUT,CONN> handler,
Reconnect reconnect) |
reactor.rx.Stream<reactor.fn.tuple.Tuple2<java.net.InetSocketAddress,java.lang.Integer>> |
start(ReactorChannelHandler<IN,OUT,CONN> handler,
Reconnect reconnect)
Open a channel to the configured address and return a
Stream that will be populated
by the ChannelStream every time a connection or reconnection is made. |
doShutdown, doStart, getDefaultCodec, getDefaultDispatcher, getDefaultEnvironment, getDefaultPrefetchSize, shutdown, startpublic static final ReactorChannelHandler PING
public final reactor.rx.Stream<reactor.fn.tuple.Tuple2<java.net.InetSocketAddress,java.lang.Integer>> start(ReactorChannelHandler<IN,OUT,CONN> handler, Reconnect reconnect)
Stream that will be populated
by the ChannelStream every time a connection or reconnection is made.
The returned Stream will typically complete when all reconnect options have been used, or error if
anything
wrong happened during the (re)connection process.
reconnect - the reconnection strategy to use when disconnects happenprotected abstract reactor.rx.Stream<reactor.fn.tuple.Tuple2<java.net.InetSocketAddress,java.lang.Integer>> doStart(ReactorChannelHandler<IN,OUT,CONN> handler, Reconnect reconnect)