1 /*
2 * Copyright 2015 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 * http://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
17 package org.openehealth.ipf.platform.camel.ihe.core;
18
19 import org.apache.camel.impl.DefaultComponent;
20 import org.apache.camel.spi.UriParam;
21
22 import java.util.List;
23 import java.util.Map;
24
25 /**
26 * Abstract base class for configuration for {@link InterceptableEndpoint} that use the Interceptor framework
27 * defined in this module
28 *
29 * @since 3.1
30 */
31 public abstract class InterceptableEndpointConfiguration {
32
33 @UriParam
34 private List<InterceptorFactory> customInterceptorFactories;
35
36 protected InterceptableEndpointConfiguration(DefaultComponent component, Map<String, Object> parameters) {
37 customInterceptorFactories = component.resolveAndRemoveReferenceListParameter(
38 parameters, "interceptorFactories", InterceptorFactory.class);
39 }
40
41 /**
42 * @return configured interceptor factories for the endpoint
43 */
44 public List<InterceptorFactory> getCustomInterceptorFactories() {
45 return customInterceptorFactories;
46 }
47 }