Skip to content

Commit a7b29fc

Browse files
committed
javadoc
1 parent 7497061 commit a7b29fc

File tree

1 file changed

+41
-11
lines changed

1 file changed

+41
-11
lines changed

core/src/main/java/org/springframework/ws/client/support/interceptor/ClientInterceptor.java

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,37 +17,67 @@
1717
package org.springframework.ws.client.support.interceptor;
1818

1919
import org.springframework.ws.client.WebServiceClientException;
20-
import org.springframework.ws.client.core.WebServiceMessageCallback;
21-
import org.springframework.ws.client.core.WebServiceTemplate;
2220
import org.springframework.ws.context.MessageContext;
2321
import org.springframework.ws.soap.SoapHeader;
2422
import org.springframework.ws.transport.WebServiceConnection;
2523

2624
/**
2725
* Workflow interface that allows for customized client-side message interception. Applications can register any number
28-
* of existing or custom interceptors on a {@link WebServiceTemplate}, to add common pre- and postprocessing behavior
29-
* without needing to modify payload handling code.
26+
* of existing or custom interceptors on a {@link org.springframework.ws.client.core.WebServiceTemplate}, to add common
27+
* pre- and postprocessing behavior without needing to modify payload handling code.
3028
* <p/>
3129
* A <code>ClientInterceptor</code> gets called after payload creation (using {@link
32-
* WebServiceTemplate#marshalSendAndReceive(Object)} or similar methods, and after {@link WebServiceMessageCallback
33-
* callback} invocation, but before the message is sent over the {@link WebServiceConnection}. This mechanism can be
34-
* used for a large field of preprocessing aspects, e.g. for authorization checks, or message header checks. Its main
35-
* purpose is to allow for factoring out meta-data (i.e. {@link SoapHeader}) related code.
30+
* org.springframework.ws.client.core.WebServiceTemplate#marshalSendAndReceive(Object)} or similar methods, and after
31+
* {@link org.springframework.ws.client.core.WebServiceMessageCallback callback} invocation, but before the message is
32+
* sent over the {@link WebServiceConnection}. This mechanism can be used for a large field of preprocessing aspects,
33+
* e.g. for authorization checks, or message header checks. Its main purpose is to allow for factoring out meta-data
34+
* (i.e. {@link SoapHeader}) related code.
3635
* <p/>
37-
* Client interceptors are defined on a {@link WebServiceTemplate}, using the {@link
38-
* WebServiceTemplate#setInterceptors(ClientInterceptor[]) interceptors} property.
36+
* Client interceptors are defined on a {@link org.springframework.ws.client.core.WebServiceTemplate}, using the {@link
37+
* org.springframework.ws.client.core.WebServiceTemplate#setInterceptors(ClientInterceptor[]) interceptors} property.
3938
*
4039
* @author Giovanni Cuccu
4140
* @author Arjen Poutsma
42-
* @see WebServiceTemplate#setInterceptors(ClientInterceptor[])
41+
* @see org.springframework.ws.client.core.WebServiceTemplate#setInterceptors(ClientInterceptor[])
4342
* @since 1.5.0
4443
*/
4544
public interface ClientInterceptor {
4645

46+
/**
47+
* Processes the outgoing request message. Called after payload creation and callback invocation, but before the
48+
* message is sent.
49+
*
50+
* @param messageContext contains the outgoing request message
51+
* @return <code>true</code> to continue processing of the request interceptors; <code>false</code> to indicate
52+
* blocking of the request endpoint chain
53+
* @throws WebServiceClientException in case of errors
54+
* @see MessageContext#getRequest()
55+
*/
4756
boolean handleRequest(MessageContext messageContext) throws WebServiceClientException;
4857

58+
/**
59+
* Processes the incoming response message. Called for non-fault response messages before payload handling in the
60+
* {@link org.springframework.ws.client.core.WebServiceTemplate}.
61+
*
62+
* @param messageContext contains the outgoing request message
63+
* @return <code>true</code> to continue processing of the request interceptors; <code>false</code> to indicate
64+
* blocking of the response endpoint chain
65+
* @throws WebServiceClientException in case of errors
66+
* @see MessageContext#getResponse()
67+
*/
4968
boolean handleResponse(MessageContext messageContext) throws WebServiceClientException;
5069

70+
/**
71+
* Processes the incoming response fault. Called for response fault messages before payload handling in the {@link
72+
* org.springframework.ws.client.core.WebServiceTemplate}.
73+
*
74+
* @param messageContext contains the outgoing request message
75+
* @return <code>true</code> to continue processing of the request interceptors; <code>false</code> to indicate
76+
* blocking of the request endpoint chain
77+
* @throws WebServiceClientException in case of errors
78+
* @see MessageContext#getResponse()
79+
* @see org.springframework.ws.FaultAwareWebServiceMessage#hasFault()
80+
*/
5181
boolean handleFault(MessageContext messageContext) throws WebServiceClientException;
5282

5383
}

0 commit comments

Comments
 (0)