Class RSocketInboundGateway

All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, Lifecycle, Phased, SmartLifecycle, ExpressionCapable, IntegrationPattern, IntegrationRSocketEndpoint, NamedComponent, IntegrationInboundManagement, IntegrationManagement, ManageableLifecycle, ManageableSmartLifecycle, TrackableComponent, ReactiveMessageHandler

public class RSocketInboundGateway extends MessagingGatewaySupport implements IntegrationRSocketEndpoint
The MessagingGatewaySupport implementation for the IntegrationRSocketEndpoint. Represents an inbound endpoint for RSocket requests.

May be configured with the AbstractRSocketConnector for mapping registration. Or existing AbstractRSocketConnector bean(s) will perform detection automatically.

An inbound DataBuffer (either single or as a Publisher element) is converted to the target expected type which can be configured by the setRequestElementClass(java.lang.Class<?>) or setRequestElementType(ResolvableType). If it is not configured, then target type is determined by the contentType header: If it is a text, then target type is String, otherwise - byte[].

An inbound Publisher is used as is in the message to send payload. It is a target application responsibility to process that payload any possible way.

A reply payload is encoded to the Flux according a type of the payload or a Publisher element type.

Since:
5.2
Author:
Artem Bilan
  • Constructor Details

    • RSocketInboundGateway

      public RSocketInboundGateway(String... pathArg)
      Instantiate based on the provided path patterns to map this endpoint for incoming RSocket requests.
      Parameters:
      pathArg - the mapping patterns to use.
  • Method Details