HandlerFunction.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final BiConsumer | |
| private final Resource | |
| private static final Set |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Mono | handle(ServerRequest
the request to handle request)Implements org. Handle the given request. |
| headersConsumer | back to summary |
|---|---|
| private final BiConsumer<Resource, HttpHeaders> headersConsumer | |
| resource | back to summary |
|---|---|
| private final Resource resource | |
| SUPPORTED_METHODS | back to summary |
|---|---|
| private static final Set<HttpMethod> SUPPORTED_METHODS | |
| ResourceHandlerFunction | back to summary |
|---|---|
| public ResourceHandlerFunction(Resource resource, BiConsumer<Resource, HttpHeaders> headersConsumer) | |
| handle | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Handle the given request.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Resource | |
| private static final byte[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | contentLength()
Implements org. Determine the content length for this resource. |
| public Resource | createRelative(String
the relative path (relative to this resource) relativePath)Implements org. Create a resource relative to this resource. |
| public boolean | exists()
Implements org. Determine whether this resource actually exists in physical form. |
| public String | getDescription()
Implements org. Return a description for this resource, to be used for error output when working with the resource. |
| public File | getFile()
Implements org. Return a File handle for this resource. |
| public String | getFilename()
Implements org. Determine the filename for this resource — typically the last
part of the path — for example, |
| public InputStream | getInputStream()
Implements org. Return an |
| public URI | getURI()
Implements org. Return a URI handle for this resource. |
| public URL | getURL()
Implements org. Return a URL handle for this resource. |
| public long | lastModified()
Implements org. Determine the last-modified timestamp for this resource. |
| delegate | back to summary |
|---|---|
| private final Resource delegate | |
| EMPTY | back to summary |
|---|---|
| private static final byte[] EMPTY | |
| HeadMethodResource | back to summary |
|---|---|
| public HeadMethodResource(Resource delegate) | |
| contentLength | back to summary |
|---|---|
| public long contentLength() throws IOException Implements org. Doc from org. Determine the content length for this resource.
| |
| createRelative | back to summary |
|---|---|
| public Resource createRelative(String relativePath) throws IOException Implements org. Doc from org. Create a resource relative to this resource.
| |
| exists | back to summary |
|---|---|
| public boolean exists() Implements org. Doc from org. Determine whether this resource actually exists in physical form. This method performs a definitive existence check, whereas the
existence of a
| |
| getDescription | back to summary |
|---|---|
| public String getDescription() Implements org. Doc from org. Return a description for this resource, to be used for error output when working with the resource. Implementations are also encouraged to return this value
from their
| |
| getFile | back to summary |
|---|---|
| public File getFile() throws IOException Implements org. Doc from org. Return a File handle for this resource.
| |
| getFilename | back to summary |
|---|---|
| public String getFilename() Implements org. Doc from org. Determine the filename for this resource — typically the last
part of the path — for example, Returns Implementations are encouraged to return the filename unencoded. | |
| getInputStream | back to summary |
|---|---|
| public InputStream getInputStream() throws IOException Implements org. Doc from org. Return an It is expected that each call creates a fresh stream. This requirement is particularly important when you consider an API such
as JavaMail, which needs to be able to read the stream multiple times when
creating mail attachments. For such a use case, it is required
that each
| |
| getURI | back to summary |
|---|---|
| public URI getURI() throws IOException Implements org. Doc from org. Return a URI handle for this resource.
| |
| getURL | back to summary |
|---|---|
| public URL getURL() throws IOException Implements org. Doc from org. Return a URL handle for this resource.
| |
| lastModified | back to summary |
|---|---|
| public long lastModified() throws IOException Implements org. Doc from org. Determine the last-modified timestamp for this resource.
| |