public class ClientRSocketConnector extends AbstractRSocketConnector
AbstractRSocketConnector extension to the RSocket connection.RSocketFactory.ClientRSocketFactory,
RSocketRequesterrSocketMessageHandlerDEFAULT_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<RSocketRequester> |
getRSocketRequester() |
void |
setFactoryConfigurer(ClientRSocketFactoryConfigurer factoryConfigurer)
Callback to configure the
ClientRSocketFactory directly. |
void |
setSetupData(Object setupData)
Set the data for the setup payload.
|
void |
setSetupMetadata(Map<Object,MimeType> setupMetadata)
Add metadata to the setup payload.
|
void |
setSetupRoute(String setupRoute)
Set the route for the setup payload.
|
void |
setSetupRouteVariables(Object... setupRouteVars)
Set the variables for route template to expand with.
|
addEndpoint, getDataMimeType, getMetadataMimeType, getRSocketStrategies, isAutoStartup, isRunning, setApplicationContext, setAutoStartup, setDataMimeType, setEndpoints, setMetadataMimeType, setRSocketStrategies, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPhase, stoppublic 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.RSocketRequester.Builder#connect(ClientTransport)public void setFactoryConfigurer(ClientRSocketFactoryConfigurer factoryConfigurer)
ClientRSocketFactory directly.
Note: this class adds extra ClientRSocketFactoryConfigurer to the
target RSocketRequester to populate a reference to an internal
RSocketMessageHandler.responder().
This overrides possible external
RSocketFactory.ClientRSocketFactory.acceptor(io.rsocket.SocketAcceptor)factoryConfigurer - the ClientRSocketFactoryConfigurer to
configure the RSocketFactory.ClientRSocketFactory.RSocketRequester.Builder#rsocketFactory(ClientRSocketFactoryConfigurer)public void setSetupRoute(String setupRoute)
setupRoute - the route to connect to.RSocketRequester.Builder#setupRoute(String, Object...)public void setSetupRouteVariables(Object... setupRouteVars)
setupRouteVars - the route to connect to.RSocketRequester.Builder#setupRoute(String, Object...)public void setSetupMetadata(Map<Object,MimeType> setupMetadata)
setSetupRoute(String).setupMetadata - the map of metadata to use.RSocketRequester.Builder#setupMetadata(Object, MimeType)public void setSetupData(Object setupData)
setupData - the data for connect frame.RSocketRequester.Builder#setupData(Object)public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class AbstractRSocketConnectorpublic void afterSingletonsInstantiated()
afterSingletonsInstantiated in interface SmartInitializingSingletonafterSingletonsInstantiated in class AbstractRSocketConnectorprotected void doStart()
doStart in class AbstractRSocketConnectorpublic void destroy()
public void connect()
public reactor.core.publisher.Mono<RSocketRequester> getRSocketRequester()