You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jekyll-www.mock-server.com/mock_server/_includes/forward_action_code_examples.html
+70-3
Original file line number
Diff line number
Diff line change
@@ -635,7 +635,7 @@
635
635
<p>See <ahref="https://app.swaggerhub.com/apis/jamesdbloom/mock-server-openapi/5.8.x#/expectation/put_expectation" target="_blank">REST API</a> for full JSON specification</p>
<p>To use a class callback MockServer must be able to <strong>load the class from the classpath</strong>.</p>
705
+
<p>The callback class must:</p>
706
+
<ul>
707
+
<li>implement <ul><li><strong><spanclass="this_value">org.mockserver.mock.action.ExpectationForwardCallback</span></strong> to dynamically override the <strong>request</strong> or</li><li><strong><spanclass="this_value">org.mockserver.mock.action.ExpectationForwardAndResponseCallback</span></strong> to dynamically override the <strong>request</strong> and the <strong>response</strong></li></ul></li>
708
+
<li>have a zero argument constructor</li>
709
+
<li>be available in the classpath of the MockServer</li>
710
+
</ul>
705
711
706
712
<p>If MockServer is started using the <ahref="/mock_server/running_mock_server.html#junit_rule">JUnit @Rule</a><strong>org.mockserver.junit.MockServerRule</strong> or using <strong>org.mockserver.integration.ClientAndServer</strong> or directly using the <strong>org.mockserver.mockserver.MockServerBuilder</strong> then any class present in the main or test classpaths will be visible to MockServer.</p>
<p>To use a class callback MockServer must be able to <strong>load the class from the classpath</strong>.</p>
832
+
<p>The callback class must:</p>
833
+
<ul>
834
+
<li>implement <ul><li><strong><spanclass="this_value">org.mockserver.mock.action.ExpectationResponseCallback</span></strong> to dynamically override the <strong>response</strong></li></ul></li>
835
+
<li>have a zero argument constructor</li>
836
+
<li>be available in the classpath of the MockServer</li>
837
+
</ul>
832
838
833
839
<p>If MockServer is started using the <ahref="/mock_server/running_mock_server.html#junit_rule">JUnit @Rule</a><strong>org.mockserver.junit.MockServerRule</strong> or using <strong>org.mockserver.integration.ClientAndServer</strong> or directly using the <strong>org.mockserver.mockserver.MockServerBuilder</strong> then any class present in the main or test classpaths will be visible to MockServer.</p>
0 commit comments