docs/doc/reference/com/google/android/exoplayer2/testutil/WebServerDispatcher.html
Package com.google.android.exoplayer2.testutil
public classWebServerDispatcherextends okhttp3.mockwebserver.Dispatcher
A Dispatcher for MockWebServer that allows per-path customisation of the static data served.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static class | WebServerDispatcher.Resource |
A resource served by WebServerDispatcher.
|
All Methods Static Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| okhttp3.mockwebserver.MockResponse | dispatch(okhttp3.mockwebserver.RecordedRequest request) | |
| static WebServerDispatcher | forResources(Iterable<WebServerDispatcher.Resource> resources) |
Constructs a dispatcher that handles requests based the provided WebServerDispatcher.Resource instances.
|
| static String | getRequestPath(okhttp3.mockwebserver.RecordedRequest request) |
Returns the path for a given RecordedRequest, stripping any query parameters.
|
-
peek, shutdown
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")getRequestPath(okhttp3.mockwebserver.RecordedRequest request)
Returns the path for a given RecordedRequest, stripping any query parameters.
-
public static[WebServerDispatcher](WebServerDispatcher.html "class in com.google.android.exoplayer2.testutil")forResources([Iterable](https://developer.android.com/reference/java/lang/Iterable.html "class or interface in java.lang")<[WebServerDispatcher.Resource](WebServerDispatcher.Resource.html "class in com.google.android.exoplayer2.testutil")> resources)
Constructs a dispatcher that handles requests based the provided WebServerDispatcher.Resource instances.
-
public okhttp3.mockwebserver.MockResponse dispatch(okhttp3.mockwebserver.RecordedRequest request)
Specified by:dispatch in class okhttp3.mockwebserver.Dispatcher