public static class WebServerDispatcher.Resource.Builder extends Object
WebServerDispatcher.Resource.| Constructor | Description |
|---|---|
Builder() |
Constructs an instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
WebServerDispatcher.Resource |
build() |
Builds the
WebServerDispatcher.Resource. |
WebServerDispatcher.Resource.Builder |
resolvesToUnknownLength(boolean resolvesToUnknownLength) |
Sets if the server shouldn't include the resource length in header responses.
|
WebServerDispatcher.Resource.Builder |
setData(byte[] data) |
Sets the data served by this resource.
|
WebServerDispatcher.Resource.Builder |
setGzipSupport(int gzipSupport) |
Sets the level of gzip support for this resource.
|
WebServerDispatcher.Resource.Builder |
setPath(String path) |
Sets the path this data should be served at.
|
WebServerDispatcher.Resource.Builder |
supportsRangeRequests(boolean supportsRangeRequests) |
Sets if RFC 7233 range requests should be supported for this resource.
|
public WebServerDispatcher.Resource.Builder setPath(String path)
public WebServerDispatcher.Resource.Builder setData(byte[] data)
public WebServerDispatcher.Resource.Builder supportsRangeRequests(boolean supportsRangeRequests)
public WebServerDispatcher.Resource.Builder resolvesToUnknownLength(boolean resolvesToUnknownLength)
If true, responses to unbound requests won't include a Content-Length header and Content-Range headers won't include the total resource length.
public WebServerDispatcher.Resource.Builder setGzipSupport(@GzipSupport int gzipSupport)
WebServerDispatcher.Resource.GZIP_SUPPORT_DISABLED.public WebServerDispatcher.Resource build()
WebServerDispatcher.Resource.