01: /*
02: * Copyright 2007 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.transport;
18:
19: import java.io.IOException;
20:
21: import org.springframework.ws.soap.SoapFault;
22:
23: /**
24: * Sub-interface of {@link WebServiceConnection} that is aware of any Fault messages received. Fault messages (such as
25: * {@link SoapFault} SOAP Faults) often require different processing rules. Typically, fault detection is done by
26: * inspecting connection error codes, etc.
27: *
28: * @author Arjen Poutsma
29: * @since 1.0.0
30: */
31: public interface FaultAwareWebServiceConnection extends
32: WebServiceConnection {
33:
34: /**
35: * Indicates whether this connection received a fault.
36: * <p/>
37: * Typically implemented by looking at an HTTP status code.
38: *
39: * @return <code>true</code> if this connection received a fault; <code>false</code> otherwise.
40: * @throws IOException in case of I/O errors
41: */
42: boolean hasFault() throws IOException;
43:
44: /**
45: * Sets whether this connection will send a fault.
46: * <p/>
47: * Typically implemented by setting an HTTP status code.
48: *
49: * @param fault <code>true</code> if this will send a fault; <code>false</code> otherwise.
50: * @throws IOException in case of I/O errors
51: */
52: void setFault(boolean fault) throws IOException;
53: }
|