Class RSocketGatewayClient

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Initiate cleaning of underlying resources (if any) like closing websocket connection or rSocket session.
      GatewayClientCodec<io.rsocket.Payload> getCodec()  
      reactor.core.publisher.Mono<Void> onClose()
      Return close completion signal of the gateway client.
      reactor.core.publisher.Flux<io.scalecube.services.api.ServiceMessage> requestChannel​(reactor.core.publisher.Flux<io.scalecube.services.api.ServiceMessage> requests)
      Communication mode that gives stream of responses to stream of requests.
      reactor.core.publisher.Mono<io.scalecube.services.api.ServiceMessage> requestResponse​(io.scalecube.services.api.ServiceMessage request)
      Communication mode that gives single response to single request.
      reactor.core.publisher.Flux<io.scalecube.services.api.ServiceMessage> requestStream​(io.scalecube.services.api.ServiceMessage request)
      Communication mode that gives stream of responses to single request.
    • Constructor Detail

      • RSocketGatewayClient

        public RSocketGatewayClient​(GatewayClientSettings settings,
                                    GatewayClientCodec<io.rsocket.Payload> codec)
        Constructor for gateway over rsocket client transport.
        Parameters:
        settings - client settings.
        codec - client codec.
    • Method Detail

      • requestResponse

        public reactor.core.publisher.Mono<io.scalecube.services.api.ServiceMessage> requestResponse​(io.scalecube.services.api.ServiceMessage request)
        Description copied from interface: GatewayClient
        Communication mode that gives single response to single request.
        Specified by:
        requestResponse in interface GatewayClient
        Parameters:
        request - request message.
        Returns:
        Publisher that emits single response form remote server as it's ready.
      • requestStream

        public reactor.core.publisher.Flux<io.scalecube.services.api.ServiceMessage> requestStream​(io.scalecube.services.api.ServiceMessage request)
        Description copied from interface: GatewayClient
        Communication mode that gives stream of responses to single request.
        Specified by:
        requestStream in interface GatewayClient
        Parameters:
        request - request message.
        Returns:
        Publisher that emits responses from remote server.
      • requestChannel

        public reactor.core.publisher.Flux<io.scalecube.services.api.ServiceMessage> requestChannel​(reactor.core.publisher.Flux<io.scalecube.services.api.ServiceMessage> requests)
        Description copied from interface: GatewayClient
        Communication mode that gives stream of responses to stream of requests.
        Specified by:
        requestChannel in interface GatewayClient
        Parameters:
        requests - request stream.
        Returns:
        Publisher that emits responses from remote server.
      • close

        public void close()
        Description copied from interface: GatewayClient
        Initiate cleaning of underlying resources (if any) like closing websocket connection or rSocket session. Subsequent calls of requestOne() or requestMany() must issue new connection creation. Note that close is not the end of client lifecycle.
        Specified by:
        close in interface GatewayClient
      • onClose

        public reactor.core.publisher.Mono<Void> onClose()
        Description copied from interface: GatewayClient
        Return close completion signal of the gateway client.
        Specified by:
        onClose in interface GatewayClient
        Returns:
        close completion signal