This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch 8958 in repository https://gitbox.apache.org/repos/asf/camel.git
commit f586ce18c35f8783507772485bd8cd3334b067e1 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue Feb 6 16:29:25 2018 +0100 CAMEL-8958: Claim Check EIP with push/pop. Work in progress. --- .../management/mbean/ManagedClaimCheckMBean.java | 32 ++++++++++++ .../DefaultManagementObjectStrategy.java | 4 ++ .../camel/management/mbean/ManagedClaimCheck.java | 57 ++++++++++++++++++++++ 3 files changed, 93 insertions(+) diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedClaimCheckMBean.java b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedClaimCheckMBean.java new file mode 100644 index 0000000..6407d55 --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedClaimCheckMBean.java @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.api.management.mbean; + +import org.apache.camel.api.management.ManagedAttribute; + +public interface ManagedClaimCheckMBean extends ManagedProcessorMBean { + + @ManagedAttribute(description = "Claim Check operation") + String getOperation(); + + @ManagedAttribute(description = "Claim check id") + String getKey(); + + @ManagedAttribute(description = "Specified a filter to control what data gets merging data back from the claim check repository") + String getFilter(); + +} \ No newline at end of file diff --git a/camel-core/src/main/java/org/apache/camel/management/DefaultManagementObjectStrategy.java b/camel-core/src/main/java/org/apache/camel/management/DefaultManagementObjectStrategy.java index e31a78b..a0e2be7 100644 --- a/camel-core/src/main/java/org/apache/camel/management/DefaultManagementObjectStrategy.java +++ b/camel-core/src/main/java/org/apache/camel/management/DefaultManagementObjectStrategy.java @@ -40,6 +40,7 @@ import org.apache.camel.management.mbean.ManagedCamelContext; import org.apache.camel.management.mbean.ManagedCamelHealth; import org.apache.camel.management.mbean.ManagedChoice; import org.apache.camel.management.mbean.ManagedCircuitBreakerLoadBalancer; +import org.apache.camel.management.mbean.ManagedClaimCheck; import org.apache.camel.management.mbean.ManagedClusterService; import org.apache.camel.management.mbean.ManagedComponent; import org.apache.camel.management.mbean.ManagedConsumer; @@ -109,6 +110,7 @@ import org.apache.camel.model.RecipientListDefinition; import org.apache.camel.model.ThreadsDefinition; import org.apache.camel.model.loadbalancer.CustomLoadBalancerDefinition; import org.apache.camel.processor.ChoiceProcessor; +import org.apache.camel.processor.ClaimCheckProcessor; import org.apache.camel.processor.ConvertBodyProcessor; import org.apache.camel.processor.Delayer; import org.apache.camel.processor.DynamicRouter; @@ -321,6 +323,8 @@ public class DefaultManagementObjectStrategy implements ManagementObjectStrategy answer = new ManagedConvertBody(context, (ConvertBodyProcessor) target, definition); } else if (target instanceof ChoiceProcessor) { answer = new ManagedChoice(context, (ChoiceProcessor) target, definition); + } else if (target instanceof ClaimCheckProcessor) { + answer = new ManagedClaimCheck(context, (ClaimCheckProcessor) target, definition); } else if (target instanceof Delayer) { answer = new ManagedDelayer(context, (Delayer) target, definition); } else if (target instanceof Throttler) { diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedClaimCheck.java b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedClaimCheck.java new file mode 100644 index 0000000..3dc3ecd --- /dev/null +++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedClaimCheck.java @@ -0,0 +1,57 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.management.mbean; + +import org.apache.camel.CamelContext; +import org.apache.camel.api.management.ManagedResource; +import org.apache.camel.api.management.mbean.ManagedClaimCheckMBean; +import org.apache.camel.model.ExpressionNode; +import org.apache.camel.model.ProcessorDefinition; +import org.apache.camel.processor.ClaimCheckProcessor; + +/** + * @version + */ +@ManagedResource(description = "Managed Claim Check") +public class ManagedClaimCheck extends ManagedProcessor implements ManagedClaimCheckMBean { + private final ClaimCheckProcessor processor; + + public ManagedClaimCheck(CamelContext context, ClaimCheckProcessor processor, ProcessorDefinition<?> definition) { + super(context, processor, definition); + this.processor = processor; + } + + @Override + public ExpressionNode getDefinition() { + return (ExpressionNode) super.getDefinition(); + } + + @Override + public String getOperation() { + return processor.getOperation(); + } + + @Override + public String getKey() { + return processor.getKey(); + } + + @Override + public String getFilter() { + return processor.getFilter(); + } +} -- To stop receiving notification emails like this one, please contact davscl...@apache.org.