public class NettyRSocketServerFactory extends Object implements RSocketServerFactory, ConfigurableRSocketServerFactory
RSocketServerFactory that can be used to create RSocketServers backed
by Netty.| Constructor and Description |
|---|
NettyRSocketServerFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
addServerCustomizers(ServerRSocketFactoryCustomizer... serverCustomizers)
Add
ServerRSocketFactoryCustomizers that should applied while building the
server. |
NettyRSocketServer |
create(io.rsocket.SocketAcceptor socketAcceptor)
Gets a new fully configured but paused
RSocketServer instance. |
void |
setAddress(InetAddress address)
Set the specific network address that the server should bind to.
|
void |
setLifecycleTimeout(Duration lifecycleTimeout)
Set the maximum amount of time that should be waited when starting or stopping the
server.
|
void |
setPort(int port)
Set the port that the server should listen on.
|
void |
setResourceFactory(org.springframework.http.client.reactive.ReactorResourceFactory resourceFactory)
Set the
ReactorResourceFactory to get the shared resources from. |
void |
setServerCustomizers(Collection<? extends ServerRSocketFactoryCustomizer> serverCustomizers)
Set
ServerRSocketFactoryCustomizers that should be applied to the RSocket
server builder. |
void |
setTransport(RSocketServer.TRANSPORT transport)
Set the transport that the RSocket server should use.
|
public void setPort(int port)
ConfigurableRSocketServerFactorysetPort in interface ConfigurableRSocketServerFactoryport - the port to setpublic void setAddress(InetAddress address)
ConfigurableRSocketServerFactorysetAddress in interface ConfigurableRSocketServerFactoryaddress - the address to set (defaults to null)public void setTransport(RSocketServer.TRANSPORT transport)
ConfigurableRSocketServerFactorysetTransport in interface ConfigurableRSocketServerFactorytransport - the transport protocol to usepublic void setResourceFactory(org.springframework.http.client.reactive.ReactorResourceFactory resourceFactory)
ReactorResourceFactory to get the shared resources from.resourceFactory - the server resourcespublic void setServerCustomizers(Collection<? extends ServerRSocketFactoryCustomizer> serverCustomizers)
ServerRSocketFactoryCustomizers that should be applied to the RSocket
server builder. Calling this method will replace any existing customizers.serverCustomizers - the customizers to setpublic void addServerCustomizers(ServerRSocketFactoryCustomizer... serverCustomizers)
ServerRSocketFactoryCustomizers that should applied while building the
server.serverCustomizers - the customizers to addpublic void setLifecycleTimeout(Duration lifecycleTimeout)
lifecycleTimeout - the lifecycle timeoutpublic NettyRSocketServer create(io.rsocket.SocketAcceptor socketAcceptor)
RSocketServerFactoryRSocketServer instance. Clients
should not be able to connect to the returned server until
RSocketServer.start() is called (which happens when the
ApplicationContext has been fully refreshed).create in interface RSocketServerFactorysocketAcceptor - the socket acceptorRSocketServerRSocketServer.stop()Copyright © 2019 Pivotal Software, Inc.. All rights reserved.