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.Component; 20 21 import java.util.List; 22 23 /** 24 * Abstract base class for components that use the Interceptor framework defined in this module 25 * 26 * @since 3.1 27 */ 28 public interface InterceptableComponent extends Component { 29 30 /** 31 * Returns a list of component-specific (i.e. transaction-specific) 32 * interceptors which will be integrated into the interceptor 33 * chain of each consumer instance created by this component. 34 * <p/> 35 * Per default returns an empty list. 36 * <br> 37 * When overwriting this method, please note: 38 * <ul> 39 * <li>Neither the returned list nor any element of it 40 * are allowed to be <code>null</code>. 41 * <li>Each invocation should return freshly created instances 42 * of interceptors (like prototype-scope beans in Spring), 43 * because interceptors cannot be reused by multiple endpoints. 44 * </ul> 45 * 46 * @return a list of component-specific (i.e. transaction-specific) FHIR interceptors 47 */ 48 List<Interceptor<?>> getAdditionalConsumerInterceptors(); 49 50 /** 51 * Returns a list of component-specific (i.e. transaction-specific) 52 * FHIR interceptors which will be integrated into the interceptor 53 * chain of each producer instance created by this component. 54 * <p/> 55 * Per default returns an empty list. 56 * <br> 57 * When overwriting this method, please note: 58 * <ul> 59 * <li>Neither the returned list nor any element of it 60 * are allowed to be <code>null</code>. 61 * <li>Each invocation should return freshly created instances 62 * of interceptors (like prototype-scope beans in Spring), 63 * because interceptors cannot be reused by multiple endpoints. 64 * </ul> 65 * 66 * @return a list of component-specific (i.e. transaction-specific) FHIR interceptors 67 */ 68 List<Interceptor<?>> getAdditionalProducerInterceptors(); 69 }