public class NettyRSocketServerFactory extends Object implements RSocketServerFactory, ConfigurableRSocketServerFactory
RSocketServerFactory
that can be used to create RSocketServer
s backed
by Netty.Constructor and Description |
---|
NettyRSocketServerFactory() |
Modifier and Type | Method and Description |
---|---|
void |
addRSocketServerCustomizers(RSocketServerCustomizer... rSocketServerCustomizers)
Add
RSocketServerCustomizer s that should be called to configure the
RSocketServer . |
void |
addSocketFactoryProcessors(ServerRSocketFactoryProcessor... socketFactoryProcessors)
Deprecated.
in favor of
addRSocketServerCustomizers(RSocketServerCustomizer...) as of 2.2.7 |
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 |
setRSocketServerCustomizers(Collection<? extends RSocketServerCustomizer> rSocketServerCustomizers)
Set
RSocketServerCustomizer s that should be called to configure the
RSocketServer while building the server. |
void |
setSocketFactoryProcessors(Collection<? extends ServerRSocketFactoryProcessor> socketFactoryProcessors)
Deprecated.
in favor of
setRSocketServerCustomizers(Collection) as of
2.2.7 |
void |
setTransport(RSocketServer.Transport transport)
Set the transport that the RSocket server should use.
|
public void setPort(int port)
ConfigurableRSocketServerFactory
setPort
in interface ConfigurableRSocketServerFactory
port
- the port to setpublic void setAddress(InetAddress address)
ConfigurableRSocketServerFactory
setAddress
in interface ConfigurableRSocketServerFactory
address
- the address to set (defaults to null
)public void setTransport(RSocketServer.Transport transport)
ConfigurableRSocketServerFactory
setTransport
in interface ConfigurableRSocketServerFactory
transport
- the transport protocol to usepublic void setResourceFactory(org.springframework.http.client.reactive.ReactorResourceFactory resourceFactory)
ReactorResourceFactory
to get the shared resources from.resourceFactory
- the server resources@Deprecated public void setSocketFactoryProcessors(Collection<? extends ServerRSocketFactoryProcessor> socketFactoryProcessors)
setRSocketServerCustomizers(Collection)
as of
2.2.7ServerRSocketFactoryProcessor
s that should be called to process the
RSocketFactory.ServerRSocketFactory
while building the server. Calling this method will
replace any existing processors.socketFactoryProcessors
- processors to apply before the server starts@Deprecated public void addSocketFactoryProcessors(ServerRSocketFactoryProcessor... socketFactoryProcessors)
addRSocketServerCustomizers(RSocketServerCustomizer...)
as of 2.2.7ServerRSocketFactoryProcessor
s that should be called to process the
RSocketFactory.ServerRSocketFactory
while building the server.socketFactoryProcessors
- processors to apply before the server startspublic void setRSocketServerCustomizers(Collection<? extends RSocketServerCustomizer> rSocketServerCustomizers)
RSocketServerCustomizer
s that should be called to configure the
RSocketServer
while building the server. Calling this
method will replace any existing customizers.rSocketServerCustomizers
- customizers to apply before the server startspublic void addRSocketServerCustomizers(RSocketServerCustomizer... rSocketServerCustomizers)
RSocketServerCustomizer
s that should be called to configure the
RSocketServer
.rSocketServerCustomizers
- customizers to apply before the server startspublic void setLifecycleTimeout(Duration lifecycleTimeout)
lifecycleTimeout
- the lifecycle timeoutpublic NettyRSocketServer create(io.rsocket.SocketAcceptor socketAcceptor)
RSocketServerFactory
RSocketServer
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 RSocketServerFactory
socketAcceptor
- the socket acceptorRSocketServer
RSocketServer.stop()
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.