01: /*
02: * Copyright 2005 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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.soap.server;
18:
19: import org.springframework.ws.server.EndpointInterceptor;
20: import org.springframework.ws.server.EndpointInvocationChain;
21:
22: /**
23: * SOAP-specific subclass of the <code>EndpointInvocationChain</code>. Adds associated actors (SOAP 1.1) or roles (SOAP
24: * 1.2). Used by the <code>SoapMessageDispatcher</code> to determine the MustUnderstand headers for particular
25: * endpoint.
26: *
27: * @author Arjen Poutsma
28: * @see #getActorsOrRoles()
29: * @see SoapMessageDispatcher
30: * @since 1.0.0
31: */
32: public class SoapEndpointInvocationChain extends
33: EndpointInvocationChain {
34:
35: private String[] actorsOrRoles;
36:
37: private boolean isUltimateReceiver = true;
38:
39: /**
40: * Create new <code>SoapEndpointInvocationChain</code>.
41: *
42: * @param endpoint the endpoint object to invoke
43: */
44: public SoapEndpointInvocationChain(Object endpoint) {
45: super (endpoint);
46: }
47:
48: /**
49: * Create new <code>SoapEndpointInvocationChain</code>.
50: *
51: * @param endpoint the endpoint object to invoke
52: * @param interceptors the array of interceptors to apply
53: */
54: public SoapEndpointInvocationChain(Object endpoint,
55: EndpointInterceptor[] interceptors) {
56: super (endpoint, interceptors);
57: }
58:
59: /**
60: * Create new <code>EndpointInvocationChain</code>.
61: *
62: * @param endpoint the endpoint object to invoke
63: * @param interceptors the array of interceptors to apply
64: * @param actorsOrRoles the array of actorsOrRoles to set
65: * @param isUltimateReceiver whether this chain fullfils the SOAP 1.2 Ultimate receiver role
66: */
67: public SoapEndpointInvocationChain(Object endpoint,
68: EndpointInterceptor[] interceptors, String[] actorsOrRoles,
69: boolean isUltimateReceiver) {
70: super (endpoint, interceptors);
71: this .actorsOrRoles = actorsOrRoles;
72: this .isUltimateReceiver = isUltimateReceiver;
73: }
74:
75: /**
76: * Gets the actors (SOAP 1.1) or roles (SOAP 1.2) associated with an invocation of this chain and its contained
77: * interceptors and endpoint.
78: *
79: * @return a string array of URIs for SOAP actors/roles
80: */
81: public String[] getActorsOrRoles() {
82: return actorsOrRoles;
83: }
84:
85: /** Indicates whether this chain fulfills the SOAP 1.2 Ultimate Receiver role. Default is <code>true</code>. */
86: public boolean isUltimateReceiver() {
87: return isUltimateReceiver;
88: }
89: }
|