Class MongoDbOutboundGateway

All Implemented Interfaces:
org.reactivestreams.Subscriber<Message<?>>, Aware, BeanClassLoaderAware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, Ordered, ExpressionCapable, Orderable, MessageProducer, HeaderPropagationAware, IntegrationPattern, NamedComponent, IntegrationManagement, TrackableComponent, MessageHandler, reactor.core.CoreSubscriber<Message<?>>

public class MongoDbOutboundGateway extends AbstractReplyProducingMessageHandler
Makes outbound operations to query a MongoDb database using a MongoOperations.
Since:
5.0
Author:
Xavier Padro, Artem Bilan
  • Constructor Details

  • Method Details

    • setQueryExpression

      public void setQueryExpression(Expression queryExpression)
    • setQueryExpressionString

      public void setQueryExpressionString(String queryExpressionString)
    • setMessageCollectionCallback

      public void setMessageCollectionCallback(MessageCollectionCallback<?> collectionCallback)
      Specify a MessageCollectionCallback to perform against MongoDB collection in the request message context.
      Parameters:
      collectionCallback - the callback to perform against MongoDB collection.
      Since:
      5.0.11
    • setExpectSingleResult

      public void setExpectSingleResult(boolean expectSingleResult)
    • setEntityClass

      public void setEntityClass(Class<?> entityClass)
    • setCollectionNameExpression

      public void setCollectionNameExpression(Expression collectionNameExpression)
    • setCollectionNameExpressionString

      public void setCollectionNameExpressionString(String collectionNameExpressionString)
    • setMongoConverter

      public void setMongoConverter(MongoConverter mongoConverter)
    • doInit

      protected void doInit()
      Overrides:
      doInit in class AbstractReplyProducingMessageHandler
    • handleRequestMessage

      protected Object handleRequestMessage(Message<?> requestMessage)
      Description copied from class: AbstractReplyProducingMessageHandler
      Subclasses must implement this method to handle the request Message. The return value may be a Message, a MessageBuilder, or any plain Object. The base class will handle the final creation of a reply Message from any of those starting points. If the return value is null, the Message flow will end here.
      Specified by:
      handleRequestMessage in class AbstractReplyProducingMessageHandler
      Parameters:
      requestMessage - The request message.
      Returns:
      The result of handling the message, or null.