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