/spring-integration-mongodb/src/main/java/org/springframework/integration/mongodb/dsl/ReactiveMongoDbMessageSourceSpec.java

https://github.com/artembilan/spring-integration · Java · 46 lines · 16 code · 8 blank · 22 comment · 0 complexity · 87d218cf996abbdd0617ac4836f69b37 MD5 · raw file

  1. /*
  2. * Copyright 2020-2021 the original author or authors.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * https://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package org.springframework.integration.mongodb.dsl;
  17. import org.springframework.data.mongodb.ReactiveMongoDatabaseFactory;
  18. import org.springframework.data.mongodb.core.ReactiveMongoOperations;
  19. import org.springframework.expression.Expression;
  20. import org.springframework.integration.mongodb.inbound.ReactiveMongoDbMessageSource;
  21. /**
  22. * A {@link AbstractMongoDbMessageSourceSpec} implementation for a {@link ReactiveMongoDbMessageSource}.
  23. *
  24. * @author Artem Bilan
  25. *
  26. * @since 5.3
  27. */
  28. public class ReactiveMongoDbMessageSourceSpec
  29. extends AbstractMongoDbMessageSourceSpec<ReactiveMongoDbMessageSourceSpec, ReactiveMongoDbMessageSource> {
  30. protected ReactiveMongoDbMessageSourceSpec(ReactiveMongoDatabaseFactory reactiveMongoDatabaseFactory,
  31. Expression queryExpression) {
  32. this.target = new ReactiveMongoDbMessageSource(reactiveMongoDatabaseFactory, queryExpression);
  33. }
  34. protected ReactiveMongoDbMessageSourceSpec(ReactiveMongoOperations reactiveMongoTemplate,
  35. Expression queryExpression) {
  36. this.target = new ReactiveMongoDbMessageSource(reactiveMongoTemplate, queryExpression);
  37. }
  38. }