Class ClientRSocketConnector
java.lang.Object
org.springframework.integration.rsocket.AbstractRSocketConnector
org.springframework.integration.rsocket.ClientRSocketConnector
- All Implemented Interfaces:
- Aware,- DisposableBean,- InitializingBean,- SmartInitializingSingleton,- ApplicationContextAware,- Lifecycle,- Phased,- SmartLifecycle
A client 
AbstractRSocketConnector extension to the RSocket connection.- Since:
- 5.2
- Author:
- Artem Bilan
- See Also:
- 
- RSocketConnector
- RSocketRequester
 
- 
Field SummaryFields inherited from class org.springframework.integration.rsocket.AbstractRSocketConnectorrSocketMessageHandlerFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructorsConstructorDescriptionClientRSocketConnector(io.rsocket.transport.ClientTransport clientTransport) Instantiate a connector based on the providedClientTransport.ClientRSocketConnector(String host, int port) Instantiate a connector based on theTcpClientTransport.Instantiate a connector based on theWebsocketClientTransport.
- 
Method SummaryModifier and TypeMethodDescriptionvoidvoidvoidconnect()Perform subscription into the RSocket server for incoming requests.voiddestroy()protected voiddoStart()Return theRSocketRequesterthis connector is built on.voidsetConnectorConfigurer(RSocketConnectorConfigurer connectorConfigurer) Callback to configure theClientRSocketFactorydirectly.voidsetSetupData(Object setupData) Set the data for the setup payload.voidsetSetupMetadata(Map<Object, MimeType> setupMetadata) Add metadata to the setup payload.voidsetSetupRoute(String setupRoute) Set the route for the setup payload.voidsetSetupRouteVariables(Object... setupRouteVars) Set the variables for route template to expand with.Methods inherited from class org.springframework.integration.rsocket.AbstractRSocketConnectoraddEndpoint, getDataMimeType, getMetadataMimeType, getRSocketStrategies, isAutoStartup, isRunning, setApplicationContext, setAutoStartup, setDataMimeType, setEndpoints, setMetadataMimeType, setRSocketStrategies, start, stopMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecyclegetPhase, stop
- 
Constructor Details- 
ClientRSocketConnectorInstantiate a connector based on theTcpClientTransport.- Parameters:
- host- the TCP host to connect.
- port- the TCP port to connect.
- See Also:
 
- 
ClientRSocketConnectorInstantiate a connector based on theWebsocketClientTransport.- Parameters:
- uri- the WebSocket URI to connect.
- See Also:
 
- 
ClientRSocketConnectorpublic ClientRSocketConnector(io.rsocket.transport.ClientTransport clientTransport) Instantiate a connector based on the providedClientTransport.- Parameters:
- clientTransport- the- ClientTransportto use.
- See Also:
 
 
- 
- 
Method Details- 
setConnectorConfigurerCallback to configure theClientRSocketFactorydirectly. Note: this class adds extraRSocketConnectorConfigurerto the targetRSocketRequesterto populate a reference to an internalRSocketMessageHandler.responder(). This overrides possible externalRSocketConnector.acceptor(io.rsocket.SocketAcceptor)- Parameters:
- connectorConfigurer- the- RSocketConnectorConfigurerto configure the- RSocketConnector.
- Since:
- 5.2.6
- See Also:
 
- 
setSetupRouteSet the route for the setup payload.- Parameters:
- setupRoute- the route to connect to.
- See Also:
 
- 
setSetupRouteVariablesSet the variables for route template to expand with.- Parameters:
- setupRouteVars- the route to connect to.
- See Also:
 
- 
setSetupMetadataAdd metadata to the setup payload. Composite metadata must be in use if this is called more than once or in addition tosetSetupRoute(String).- Parameters:
- setupMetadata- the map of metadata to use.
- See Also:
 
- 
setSetupDataSet the data for the setup payload.- Parameters:
- setupData- the data for connect frame.
- See Also:
 
- 
afterPropertiesSetpublic void afterPropertiesSet()- Specified by:
- afterPropertiesSetin interface- InitializingBean
- Overrides:
- afterPropertiesSetin class- AbstractRSocketConnector
 
- 
afterSingletonsInstantiatedpublic void afterSingletonsInstantiated()- Specified by:
- afterSingletonsInstantiatedin interface- SmartInitializingSingleton
- Overrides:
- afterSingletonsInstantiatedin class- AbstractRSocketConnector
 
- 
doStartprotected void doStart()- Specified by:
- doStartin class- AbstractRSocketConnector
 
- 
destroypublic void destroy()
- 
connectpublic void connect()Perform subscription into the RSocket server for incoming requests.
- 
getRequesterReturn theRSocketRequesterthis connector is built on.- Returns:
- the RSocketRequesterthis connector is built on.
- Since:
- 5.4
 
 
-