Package io.fabric8.mockwebserver.http
Class Dispatcher
- java.lang.Object
-
- io.fabric8.mockwebserver.http.Dispatcher
-
- Direct Known Subclasses:
CrudDispatcher,MockDispatcher,QueueDispatcher
public abstract class Dispatcher extends Object
Handler for mock server requests.
-
-
Constructor Summary
Constructors Constructor Description Dispatcher()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract MockResponsedispatch(RecordedRequest request)Returns a response to satisfyrequest.voidshutdown()Release any resources held by this dispatcher.
-
-
-
Method Detail
-
dispatch
public abstract MockResponse dispatch(RecordedRequest request)
Returns a response to satisfyrequest. This method may block (for instance, to wait on a CountdownLatch).
-
shutdown
public void shutdown()
Release any resources held by this dispatcher. Any requests that are currently being dispatched should return immediately. Responses returned after shutdown will not be transmitted: their socket connections have already been closed.
-
-