public abstract static class Spec.PeerSpec<IN,OUT,CONN extends ChannelStream<IN,OUT>,S extends Spec.PeerSpec<IN,OUT,CONN,S,N>,N extends ReactorPeer<IN,OUT,CONN>>
extends reactor.bus.spec.DispatcherComponentSpec<S,N>
| Modifier and Type | Field and Description |
|---|---|
protected reactor.io.codec.Codec<reactor.io.buffer.Buffer,IN,OUT> |
codec |
protected java.net.InetSocketAddress |
listenAddress |
protected ServerSocketOptions |
options |
| Constructor and Description |
|---|
PeerSpec() |
| Modifier and Type | Method and Description |
|---|---|
S |
codec(reactor.io.codec.Codec<reactor.io.buffer.Buffer,IN,OUT> codec)
The
Codec to use to encode and decode data. |
S |
listen(java.net.InetSocketAddress listenAddress)
The
InetSocketAddress on which this server should listen. |
S |
listen(int port)
The port on which this server should listen, assuming it should bind to all available addresses.
|
S |
listen(java.lang.String host,
int port)
The host and port on which this server should listen.
|
S |
options(ServerSocketOptions options)
Set the common
ServerSocketOptions for channels made in this server. |
S |
rawData(boolean israw)
Bypass any Reactor Buffer encoding for received data
|
protected ServerSocketOptions options
protected java.net.InetSocketAddress listenAddress
public S options(@Nonnull ServerSocketOptions options)
ServerSocketOptions for channels made in this server.options - The options to set when new channels are made.public S listen(int port)
port - The port to listen on.public S listen(java.lang.String host, int port)
host - The host to bind to.port - The port to listen on.public S listen(java.net.InetSocketAddress listenAddress)
InetSocketAddress on which this server should listen.listenAddress - the listen addresspublic S codec(@Nonnull reactor.io.codec.Codec<reactor.io.buffer.Buffer,IN,OUT> codec)
Codec to use to encode and decode data.codec - The codec to use.public S rawData(boolean israw)
israw - to enable raw data transfer from the server (e.g. ByteBuf from Netty).