/camel-core/src/main/java/org/apache/camel/processor/aggregate/CompletionAwareAggregationStrategy.java

https://github.com/jatin-28/camel · Java · 39 lines · 5 code · 4 blank · 30 comment · 0 complexity · 739ac0dfb06b0b633f1a2172e247f067 MD5 · raw file

  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. package org.apache.camel.processor.aggregate;
  18. import org.apache.camel.Exchange;
  19. /**
  20. * A specialized {@link AggregationStrategy} which has callback when the aggregated {@link Exchange} is completed.
  21. *
  22. * @version
  23. */
  24. public interface CompletionAwareAggregationStrategy extends AggregationStrategy {
  25. // TODO: In Camel 3.0 we should move this to org.apache.camel package
  26. /**
  27. * The aggregated {@link Exchange} has completed
  28. *
  29. * <b>Important: </b> This method must <b>not</b> throw any exceptions.
  30. *
  31. * @param exchange the current aggregated exchange, or the original {@link org.apache.camel.Exchange} if no aggregation
  32. * has been done before the completion occurred
  33. */
  34. void onCompletion(Exchange exchange);
  35. }