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 DispatcherComponentSpec<S,N>
Modifier and Type | Field and Description |
---|---|
protected Codec<Buffer,IN,OUT> |
codec |
protected InetSocketAddress |
listenAddress |
protected ServerSocketOptions |
options |
Constructor and Description |
---|
PeerSpec() |
Modifier and Type | Method and Description |
---|---|
S |
codec(Codec<Buffer,IN,OUT> codec)
The
Codec to use to encode and decode data. |
S |
listen(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(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
|
configure, defaultDispatcher, dispatcher, dispatcher, env, get, synchronousDispatcher
protected ServerSocketOptions options
protected 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(String host, int port)
host
- The host to bind to.port
- The port to listen on.public S listen(InetSocketAddress listenAddress)
InetSocketAddress
on which this server should listen.listenAddress
- the listen addresspublic S codec(@Nonnull Codec<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).Copyright © 2016. All rights reserved.