1 /* 2 * Copyright 2005 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.springframework.ws.server; 18 19 /** 20 * Endpoint invocation chain, consisting of an endpoint object and any preprocessing interceptors. 21 * 22 * @author Arjen Poutsma 23 * @see EndpointInterceptor 24 * @since 1.0.0 25 */ 26 public class EndpointInvocationChain { 27 28 private Object endpoint; 29 30 private EndpointInterceptor[] interceptors; 31 32 /** 33 * Create new <code>EndpointInvocationChain</code>. 34 * 35 * @param endpoint the endpoint object to invoke 36 */ 37 public EndpointInvocationChain(Object endpoint) { 38 this.endpoint = endpoint; 39 } 40 41 /** 42 * Create new <code>EndpointInvocationChain</code>. 43 * 44 * @param endpoint the endpoint object to invoke 45 * @param interceptors the array of interceptors to apply 46 */ 47 public EndpointInvocationChain(Object endpoint, EndpointInterceptor[] interceptors) { 48 this.endpoint = endpoint; 49 this.interceptors = interceptors; 50 } 51 52 /** 53 * Returns the endpoint object to invoke. 54 * 55 * @return the endpoint object 56 */ 57 public Object getEndpoint() { 58 return endpoint; 59 } 60 61 /** 62 * Returns the array of interceptors to apply before the handler executes. 63 * 64 * @return the array of interceptors 65 */ 66 public EndpointInterceptor[] getInterceptors() { 67 return interceptors; 68 } 69 70 }