For example:
CloseableChannel closeable =
RSocketServer.create(SocketAcceptor.with(new RSocket() {...}))
.bind(TcpServerTransport.create("localhost", 7000))
.block();
| Modifier and Type | Field and Description |
|---|---|
| private SocketAcceptor | |
| private InitializingInterceptorRegistry | |
| private Consumer | |
| private int | |
| private int | |
| private PayloadDecoder | |
| private Resume | |
| private static final String | |
| private Duration |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private Mono | accept(ServerSetup serverSetup, ByteBuf startFrame, DuplexConnection clientServerConnection, int maxFrameLength)
|
| public RSocketServer | Returns: the same instance for method chainingthe acceptor to handle incoming connections and requests with acceptor)Set the acceptor to handle incoming connections and handle requests. |
| private Mono | |
| private Mono | |
| private Mono | acceptSetup(ServerSetup serverSetup, ByteBuf setupFrame, DuplexConnection clientServerConnection, int maxFrameLength)
|
| public ServerTransport. | asConnectionAcceptor()
An alternative to |
| public ServerTransport. | asConnectionAcceptor(int maxFrameLength)
An alternative to |
| public < the type of T extends Closeable> MonoCloseable for the given transport | Returns: aMono with a Closeable that can be used to obtain information about
the server, stop it, or be notified of when it is stopped.the transport of choice to connect with transport)Start the server on the given transport. |
| public <T extends Closeable> T | |
| public static RSocketServer | |
| public static RSocketServer | Returns: the same instance for method chainingthe acceptor to handle connections with acceptor)Static factory method to create an |
| pack-priv ServerSetup | |
| public RSocketServer | Returns: the same instance for method chainingthe threshold size for fragmentation, must be no less than 64 mtu)When this is set, frames larger than the given maximum transmission unit (mtu) size value are fragmented. |
| public RSocketServer | Returns: the same instance for method chaininga configurer to customize interception with. configurer)Configure interception at one of the following levels:
|
| public RSocketServer | Returns: the same instance for method chainingconsumer which accepts leaseConfigurer)LeaseSpec and use it for configuringEnables the Lease feature of the RSocket protocol where the number of requests that can be
performed from either side are rationed via |
| public RSocketServer | Returns: the same instance for method chainingthe threshold size for reassembly, must no be less than 64 bytes.
Please note, maxInboundPayloadSize)maxInboundPayloadSize must always be greater or equal to io., otherwise inbound frame can exceed the
maxInboundPayloadSizeWhen this is set, frames reassembler control maximum payload size which can be reassembled. |
| public RSocketServer | Returns: the same instance for method chainingduration timeout)Specify the max time to wait for the first frame (e.g. |
| public RSocketServer | Returns: the same instance for method chainingthe decoder to use decoder)Configure the |
| private RSocketErrorException | |
| public RSocketServer | |
| private ServerSetup |
| acceptor | back to summary |
|---|---|
| private SocketAcceptor acceptor | |
| interceptors | back to summary |
|---|---|
| private InitializingInterceptorRegistry interceptors | |
| leaseConfigurer | back to summary |
|---|---|
| private Consumer<LeaseSpec> leaseConfigurer | |
| maxInboundPayloadSize | back to summary |
|---|---|
| private int maxInboundPayloadSize | |
| mtu | back to summary |
|---|---|
| private int mtu | |
| payloadDecoder | back to summary |
|---|---|
| private PayloadDecoder payloadDecoder | |
| resume | back to summary |
|---|---|
| private Resume resume | |
| SERVER_TAG | back to summary |
|---|---|
| private static final String SERVER_TAG | |
| timeout | back to summary |
|---|---|
| private Duration timeout | |
| RSocketServer | back to summary |
|---|---|
| private RSocketServer() | |
| accept | back to summary |
|---|---|
| private Mono | |
| acceptor | back to summary |
|---|---|
| public RSocketServer acceptor(SocketAcceptor acceptor) Set the acceptor to handle incoming connections and handle requests. An example with access to the
A shortcut to provide the handling RSocket only:
A shortcut to handle request-response interactions only:
By default,
| |
| acceptor | back to summary |
|---|---|
| private Mono | |
| acceptResume | back to summary |
|---|---|
| private Mono | |
| acceptSetup | back to summary |
|---|---|
| private Mono | |
| asConnectionAcceptor | back to summary |
|---|---|
| public ServerTransport. An alternative to | |
| asConnectionAcceptor | back to summary |
|---|---|
| public ServerTransport. An alternative to | |
| bind | back to summary |
|---|---|
| public <T extends Closeable> Mono Start the server on the given transport. The following transports are available from additional RSocket Java modules:
| |
| bindNow | back to summary |
|---|---|
| public <T extends Closeable> T bindNow(ServerTransport<T> transport) Start the server on the given transport. Effectively is a shortcut for | |
| create | back to summary |
|---|---|
| public static RSocketServer create() Static factory method to create an | |
| create | back to summary |
|---|---|
| public static RSocketServer create(SocketAcceptor acceptor) Static factory method to create an RSocketServer.create().acceptor(...);
| |
| createSetup | back to summary |
|---|---|
| pack-priv ServerSetup createSetup(Duration timeout) | |
| fragment | back to summary |
|---|---|
| public RSocketServer fragment(int mtu) When this is set, frames larger than the given maximum transmission unit (mtu) size value are fragmented. By default this is not set in which case payloads are sent whole up to the maximum frame size of 16,777,215 bytes.
| |
| interceptors | back to summary |
|---|---|
| public RSocketServer interceptors(Consumer<InterceptorRegistry> configurer) Configure interception at one of the following levels:
| |
| lease | back to summary |
|---|---|
| public RSocketServer lease(Consumer<LeaseSpec> leaseConfigurer) Enables the Lease feature of the RSocket protocol where the number of requests that can be
performed from either side are rationed via Example usage:
By default this is not enabled.
| |
| maxInboundPayloadSize | back to summary |
|---|---|
| public RSocketServer maxInboundPayloadSize(int maxInboundPayloadSize) When this is set, frames reassembler control maximum payload size which can be reassembled. By default this is not set in which case maximum reassembled payloads size is not controlled.
| |
| maxTimeToFirstFrame | back to summary |
|---|---|
| public RSocketServer maxTimeToFirstFrame(Duration timeout) Specify the max time to wait for the first frame (e.g. By default this is set to 1 minute.
| |
| payloadDecoder | back to summary |
|---|---|
| public RSocketServer payloadDecoder(PayloadDecoder decoder) Configure the
By default this is set to
| |
| rejectedSetupError | back to summary |
|---|---|
| private RSocketErrorException rejectedSetupError(Throwable err) | |
| resume | back to summary |
|---|---|
| public RSocketServer resume(Resume resume) Enables the Resume capability of the RSocket protocol where if the client gets disconnected, the connection is re-acquired and any interrupted streams are transparently resumed. For this to work clients must also support and request to enable this when connecting. Use the By default this is not enabled.
| |
| serverSetup | back to summary |
|---|---|
| private ServerSetup serverSetup(Duration timeout) | |