类 NettyRSocketServerFactory
java.lang.Object
org.springframework.boot.rsocket.netty.NettyRSocketServerFactory
public class NettyRSocketServerFactory
extends Object
implements RSocketServerFactory, ConfigurableRSocketServerFactory
RSocketServerFactory
that can be used to create RSocketServer
s backed
by Netty.- 从以下版本开始:
- 2.2.0
- 作者:
- Brian Clozel, Chris Bono, Scott Frederick
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
addRSocketServerCustomizers
(RSocketServerCustomizer... rSocketServerCustomizers) AddRSocketServerCustomizer
s that should be called to configure theRSocketServer
.create
(io.rsocket.SocketAcceptor socketAcceptor) Gets a new fully configured but pausedRSocketServer
instance.void
setAddress
(InetAddress address) Set the specific network address that the server should bind to.void
setFragmentSize
(DataSize fragmentSize) Specify the maximum transmission unit.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
(ReactorResourceFactory resourceFactory) Set theReactorResourceFactory
to get the shared resources from.void
setRSocketServerCustomizers
(Collection<? extends RSocketServerCustomizer> rSocketServerCustomizers) SetRSocketServerCustomizer
s that should be called to configure theRSocketServer
while building the server.void
Sets the SSL configuration that will be applied to the server's default connector.void
setSslBundles
(SslBundles sslBundles) Sets an SSL bundle that can be used to get SSL configuration.void
setTransport
(RSocketServer.Transport transport) Set the transport that the RSocket server should use.
-
构造器详细资料
-
NettyRSocketServerFactory
public NettyRSocketServerFactory()
-
-
方法详细资料
-
setPort
public void setPort(int port) 从接口复制的说明:ConfigurableRSocketServerFactory
Set the port that the server should listen on. If not specified port '9898' will be used.- 指定者:
setPort
在接口中ConfigurableRSocketServerFactory
- 参数:
port
- the port to set
-
setFragmentSize
从接口复制的说明:ConfigurableRSocketServerFactory
Specify the maximum transmission unit. Frames larger than the specifiedfragmentSize
are fragmented.- 指定者:
setFragmentSize
在接口中ConfigurableRSocketServerFactory
- 参数:
fragmentSize
- the fragment size
-
setAddress
从接口复制的说明:ConfigurableRSocketServerFactory
Set the specific network address that the server should bind to.- 指定者:
setAddress
在接口中ConfigurableRSocketServerFactory
- 参数:
address
- the address to set (defaults tonull
)
-
setTransport
从接口复制的说明:ConfigurableRSocketServerFactory
Set the transport that the RSocket server should use.- 指定者:
setTransport
在接口中ConfigurableRSocketServerFactory
- 参数:
transport
- the transport protocol to use
-
setSsl
从接口复制的说明:ConfigurableRSocketServerFactory
Sets the SSL configuration that will be applied to the server's default connector.- 指定者:
setSsl
在接口中ConfigurableRSocketServerFactory
- 参数:
ssl
- the SSL configuration
-
setSslBundles
从接口复制的说明:ConfigurableRSocketServerFactory
Sets an SSL bundle that can be used to get SSL configuration.- 指定者:
setSslBundles
在接口中ConfigurableRSocketServerFactory
- 参数:
sslBundles
- the SSL bundles
-
setResourceFactory
Set theReactorResourceFactory
to get the shared resources from.- 参数:
resourceFactory
- the server resources
-
setRSocketServerCustomizers
public void setRSocketServerCustomizers(Collection<? extends RSocketServerCustomizer> rSocketServerCustomizers) SetRSocketServerCustomizer
s that should be called to configure theRSocketServer
while building the server. Calling this method will replace any existing customizers.- 参数:
rSocketServerCustomizers
- customizers to apply before the server starts- 从以下版本开始:
- 2.2.7
-
addRSocketServerCustomizers
AddRSocketServerCustomizer
s that should be called to configure theRSocketServer
.- 参数:
rSocketServerCustomizers
- customizers to apply before the server starts- 从以下版本开始:
- 2.2.7
-
setLifecycleTimeout
Set the maximum amount of time that should be waited when starting or stopping the server.- 参数:
lifecycleTimeout
- the lifecycle timeout
-
create
从接口复制的说明:RSocketServerFactory
Gets a new fully configured but pausedRSocketServer
instance. Clients should not be able to connect to the returned server untilRSocketServer.start()
is called (which happens when theApplicationContext
has been fully refreshed).- 指定者:
create
在接口中RSocketServerFactory
- 参数:
socketAcceptor
- the socket acceptor- 返回:
- a fully configured and started
RSocketServer
- 另请参阅:
-
getServerNameSslBundles
-