public class ClientRSocketConnector extends AbstractRSocketConnector
AbstractRSocketConnector
extension to the RSocket server.
Note: the RSocketFactory.ClientRSocketFactory#acceptor(java.util.function.Function)
in the provided factoryConfigurer
is overridden with an internal IntegrationRSocketAcceptor
for the proper Spring Integration channel adapter mappings.
RSocketFactory.ClientRSocketFactory
,
RSocketRequester
rsocketAcceptor
DEFAULT_PHASE
Constructor and Description |
---|
ClientRSocketConnector(io.rsocket.transport.ClientTransport clientTransport)
Instantiate a connector based on the provided
ClientTransport . |
ClientRSocketConnector(String host,
int port)
Instantiate a connector based on the
TcpClientTransport . |
ClientRSocketConnector(URI uri)
Instantiate a connector based on the
WebsocketClientTransport . |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
afterSingletonsInstantiated() |
void |
connect()
Perform subscription into the RSocket server for incoming requests.
|
void |
destroy() |
protected void |
doStart() |
reactor.core.publisher.Mono<org.springframework.messaging.rsocket.RSocketRequester> |
getRSocketRequester() |
void |
setConnectData(String connectData)
Configure a data for connect.
|
void |
setConnectRoute(String connectRoute)
Configure a route for server RSocket endpoint.
|
void |
setFactoryConfigurer(java.util.function.Consumer<io.rsocket.RSocketFactory.ClientRSocketFactory> factoryConfigurer)
Specify a
Consumer for configuring a RSocketFactory.ClientRSocketFactory . |
addEndpoint, getDataMimeType, getRSocketStrategies, isRunning, setApplicationContext, setDataMimeType, setEndpoints, setRSocketStrategies, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPhase, isAutoStartup, stop
public ClientRSocketConnector(String host, int port)
TcpClientTransport
.host
- the TCP host to connect.port
- the TCP port to connect.ClientRSocketConnector(ClientTransport)
public ClientRSocketConnector(URI uri)
WebsocketClientTransport
.uri
- the WebSocket URI to connect.ClientRSocketConnector(ClientTransport)
public ClientRSocketConnector(io.rsocket.transport.ClientTransport clientTransport)
ClientTransport
.clientTransport
- the ClientTransport
to use.public void setFactoryConfigurer(java.util.function.Consumer<io.rsocket.RSocketFactory.ClientRSocketFactory> factoryConfigurer)
Consumer
for configuring a RSocketFactory.ClientRSocketFactory
.factoryConfigurer
- the Consumer
to configure the RSocketFactory.ClientRSocketFactory
.public void setConnectRoute(String connectRoute)
connectRoute
- the route to connect to.public void setConnectData(String connectData)
connectData
- the data for connect frame.public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
afterPropertiesSet
in class AbstractRSocketConnector
public void afterSingletonsInstantiated()
afterSingletonsInstantiated
in interface SmartInitializingSingleton
afterSingletonsInstantiated
in class AbstractRSocketConnector
protected void doStart()
doStart
in class AbstractRSocketConnector
public void destroy()
public void connect()
public reactor.core.publisher.Mono<org.springframework.messaging.rsocket.RSocketRequester> getRSocketRequester()