Class HttpClassCallback

    • Constructor Detail

      • HttpClassCallback

        public HttpClassCallback()
    • Method Detail

      • callback

        public static HttpClassCallback callback()
        Static builder to create a callback.
      • callback

        public static HttpClassCallback callback​(String callbackClass)
        Static builder to create a callback, which take a callback class as a string.

        The callback class must: - implement org.mockserver.mock.action.ExpectationResponseCallback or - implement org.mockserver.mock.action.ExpectationForwardCallback or - implement org.mockserver.mock.action.ExpectationForwardAndResponseCallback - have a zero argument constructor - be available in the classpath of the MockServer

        Parameters:
        callbackClass - class to callback as a fully qualified class name, i.e. "com.foo.MyExpectationResponseCallback"
      • callback

        public static HttpClassCallback callback​(Class<? extends ExpectationCallback<HttpRequest>> callbackClass)
        Static builder to create a callback, which take a callback class.

        The callback class must: - implement org.mockserver.mock.action.ExpectationResponseCallback or - implement org.mockserver.mock.action.ExpectationForwardCallback or - implement org.mockserver.mock.action.ExpectationForwardAndResponseCallback - have a zero argument constructor - be available in the classpath of the MockServer

        Parameters:
        callbackClass - class to callback as a fully qualified class name, i.e. "com.foo.MyExpectationResponseCallback"
      • getCallbackClass

        public String getCallbackClass()
      • withCallbackClass

        public HttpClassCallback withCallbackClass​(String callbackClass)
        The class to callback as a fully qualified class name

        The callback class must: - implement org.mockserver.mock.action.ExpectationResponseCallback or - implement org.mockserver.mock.action.ExpectationForwardCallback or - implement org.mockserver.mock.action.ExpectationForwardAndResponseCallback - have a zero argument constructor - be available in the classpath of the MockServer

        Parameters:
        callbackClass - class to callback as a fully qualified class name, i.e. "com.foo.MyExpectationResponseCallback"
      • withCallbackClass

        public HttpClassCallback withCallbackClass​(Class<? extends ExpectationCallback<HttpRequest>> callbackClass)
        The class to callback

        The callback class must: - implement org.mockserver.mock.action.ExpectationResponseCallback or - implement org.mockserver.mock.action.ExpectationForwardCallback or - implement org.mockserver.mock.action.ExpectationForwardAndResponseCallback - have a zero argument constructor - be available in the classpath of the MockServer

        Parameters:
        callbackClass - class to callback as a fully qualified class name, i.e. "com.foo.MyExpectationResponseCallback"