Skip to content

Commit e052e93

Browse files
authored
update interceptor documentation (#2172)
* edit docs * fix default value * rm
1 parent f2c6b54 commit e052e93

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

core/src/main/java/com/predic8/membrane/core/interceptor/balancer/LoadBalancingInterceptor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
/**
3737
* @description Performs load-balancing between several nodes. Nodes sharing session state may be bundled into a cluster.
38-
* @explanation May only be used as interceptor in a ServiceProxy.
38+
* @explanation May only be used as interceptor in a serviceProxy or api.
3939
* @topic 2. Enterprise Integration Patterns
4040
*/
4141
@MCElement(name = "balancer")
@@ -188,7 +188,7 @@ private Session getSession(String sessionId) {
188188
* This is *NOT* {@link #setDisplayName(String)}, but the balancer's name
189189
* set in the proxy configuration to identify this balancer.
190190
*
191-
* @description Uniquely identifies this Load Balancer, if there is more than one. Used
191+
* @description Uniquely identifies this load balancer, if there is more than one. Used
192192
* in the web administration interface and lbclient to manage nodes.
193193
* @example balancer1
194194
* @default Default

core/src/main/java/com/predic8/membrane/core/interceptor/flow/IfInterceptor.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@
2929

3030
/**
3131
* @description <p>
32-
* The "if" interceptor supports conditional execution of nested plugins.
32+
* if allows conditional execution of nested interceptors.
3333
* </p>
34-
* See:
35-
* - com.predic8.membrane.core.interceptor.flow.IfInterceptorSpELTest
36-
* - com.predic8.membrane.core.interceptor.flow.IfInterceptorGroovyTest
37-
* - com.predic8.membrane.core.interceptor.flow.IfInterceptorJsonpathTest
38-
* - com.predic8.membrane.core.interceptor.flow.IfInterceptorXPathTest
34+
* <pre><code><if test="method == 'POST'" language="SpEL">
35+
* ...
36+
* </if>
37+
* </code></pre>
3938
* @topic 1. Proxies and Flow
4039
*/
4140
@MCElement(name = "if")
@@ -100,8 +99,8 @@ public Language getLanguage() {
10099
}
101100

102101
/**
103-
* @description the language of the 'test' condition
104-
* @default groovy
102+
* @description Language of the 'test' condition
103+
* @default SpEL
105104
* @example SpEL, groovy, jsonpath, xpath
106105
*/
107106
@MCAttribute
@@ -114,8 +113,8 @@ public String getTest() {
114113
}
115114

116115
/**
117-
* @description the condition to be tested
118-
* @example exc.request.header.userAgentSupportsSNI
116+
* @description Condition to be tested
117+
* @example <ul><li>request.isJSON()</li><li>params['limit'] >= 0</li><li>statusCode matches '[45]\d\d'</li></ul>
119118
*/
120119
@Required
121120
@MCAttribute

core/src/main/java/com/predic8/membrane/core/interceptor/flow/ReturnInterceptor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* 2. If there is no response in the exchange, the body and contentType of the request is copied into a new response.
4040
* </p>
4141
* <p>
42-
* The options statusCode and contentType will overwrite the values from the messages.
42+
* The options <i>statusCode</i> and <i>contentType</i> will overwrite the values from the messages.
4343
* </p>
4444
* <p>
4545
* This plugin is useful together with the template plugin. See examples/template.
@@ -121,7 +121,7 @@ public EnumSet<Flow> getFlow() {
121121
}
122122

123123
/**
124-
* @description The HTTP status code to be returned.
124+
* @description HTTP status code to be returned.
125125
* @default 200
126126
* @example 400
127127
*/
@@ -135,7 +135,7 @@ public int getStatusCode() {
135135
}
136136

137137
/**
138-
* @description The content type of the response. If not set, the content type of the request (if available) or no content type will be used.
138+
* @description Content type of the response. If not set, the content type of the request (if available) or no content type will be used.
139139
* @default null
140140
* @example application/json; charset=utf-8
141141
*/

0 commit comments

Comments
 (0)