Class NettyRSocketServerFactory
java.lang.Object
org.springframework.boot.rsocket.netty.NettyRSocketServerFactory
- All Implemented Interfaces:
- ConfigurableRSocketServerFactory,- RSocketServerFactory
public class NettyRSocketServerFactory
extends Object
implements RSocketServerFactory, ConfigurableRSocketServerFactory
RSocketServerFactory that can be used to create RSocketServers backed
 by Netty.- Since:
- 2.2.0
- Author:
- Brian Clozel, Chris Bono, Scott Frederick
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddRSocketServerCustomizers(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.voidsetSslStoreProvider(SslStoreProvider sslStoreProvider) Sets a provider that will be used to obtain SSL stores.voidsetTransport(RSocketServer.Transport transport) Set the transport that the RSocket server should use.
- 
Constructor Details- 
NettyRSocketServerFactorypublic NettyRSocketServerFactory()
 
- 
- 
Method Details- 
setPortpublic void setPort(int port) Description copied from interface:ConfigurableRSocketServerFactorySet the port that the server should listen on. If not specified port '9898' will be used.- Specified by:
- setPortin interface- ConfigurableRSocketServerFactory
- Parameters:
- port- the port to set
 
- 
setFragmentSizeDescription copied from interface:ConfigurableRSocketServerFactorySpecify the maximum transmission unit. Frames larger than the specifiedfragmentSizeare fragmented.- Specified by:
- setFragmentSizein interface- ConfigurableRSocketServerFactory
- Parameters:
- fragmentSize- the fragment size
 
- 
setAddressDescription copied from interface:ConfigurableRSocketServerFactorySet the specific network address that the server should bind to.- Specified by:
- setAddressin interface- ConfigurableRSocketServerFactory
- Parameters:
- address- the address to set (defaults to- null)
 
- 
setTransportDescription copied from interface:ConfigurableRSocketServerFactorySet the transport that the RSocket server should use.- Specified by:
- setTransportin interface- ConfigurableRSocketServerFactory
- Parameters:
- transport- the transport protocol to use
 
- 
setSslDescription copied from interface:ConfigurableRSocketServerFactorySets the SSL configuration that will be applied to the server's default connector.- Specified by:
- setSslin interface- ConfigurableRSocketServerFactory
- Parameters:
- ssl- the SSL configuration
 
- 
setSslStoreProviderDescription copied from interface:ConfigurableRSocketServerFactorySets a provider that will be used to obtain SSL stores.- Specified by:
- setSslStoreProviderin interface- ConfigurableRSocketServerFactory
- Parameters:
- sslStoreProvider- the SSL store provider
 
- 
setResourceFactorySet theReactorResourceFactoryto get the shared resources from.- Parameters:
- resourceFactory- the server resources
 
- 
setRSocketServerCustomizerspublic 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.- Parameters:
- rSocketServerCustomizers- customizers to apply before the server starts
- Since:
- 2.2.7
 
- 
addRSocketServerCustomizersAddRSocketServerCustomizers that should be called to configure theRSocketServer.- Parameters:
- rSocketServerCustomizers- customizers to apply before the server starts
- Since:
- 2.2.7
 
- 
setLifecycleTimeoutSet the maximum amount of time that should be waited when starting or stopping the server.- Parameters:
- lifecycleTimeout- the lifecycle timeout
 
- 
createDescription copied from interface: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).- Specified by:
- createin interface- RSocketServerFactory
- Parameters:
- socketAcceptor- the socket acceptor
- Returns:
- a fully configured and started RSocketServer
- See Also:
 
 
-