| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final FileCache | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private NextAction | |
| public FileCache | |
| public NextAction | handleRead(final FilterChainContext ctx)
Overrides org. Implements org. Execute a unit of processing work to be performed, when channel will become available for reading. |
| private void | prepareResponse(final FileCacheEntry entry, final HttpResponsePacket response)
Prepares common response headers. |
| private void | prepareResponseWithPayload(final FileCacheEntry entry, final HttpResponsePacket response, final boolean isServeCompressed)
Prepare response with payload headers. |
| private NextAction | sendFileUsingBuffers(final FilterChainContext ctx, final HttpResponsePacket response, final FileCacheEntry cacheEntry, final boolean isServeCompressed)
|
| private NextAction | sendFileZeroCopy(final FilterChainContext ctx, final HttpResponsePacket response, final FileCacheEntry cacheEntry, final boolean isServeCompressed)
|
| fileCache | back to summary |
|---|---|
| private final FileCache fileCache | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| FileCacheFilter | back to summary |
|---|---|
| public FileCacheFilter(FileCache fileCache) | |
| flush | back to summary |
|---|---|
| private NextAction flush(final FilterChainContext ctx) | |
| getFileCache | back to summary |
|---|---|
| public FileCache getFileCache() | |
| handleRead | back to summary |
|---|---|
| public NextAction handleRead(final FilterChainContext ctx) throws IOException Overrides org. Implements org. Doc from org. Execute a unit of processing work to be performed, when channel will become available for reading. This
| |
| prepareResponse | back to summary |
|---|---|
| private void prepareResponse(final FileCacheEntry entry, final HttpResponsePacket response) throws IOException Prepares common response headers. | |
| prepareResponseWithPayload | back to summary |
|---|---|
| private void prepareResponseWithPayload(final FileCacheEntry entry, final HttpResponsePacket response, final boolean isServeCompressed) throws IOException Prepare response with payload headers. | |
| sendFileUsingBuffers | back to summary |
|---|---|
| private NextAction sendFileUsingBuffers(final FilterChainContext ctx, final HttpResponsePacket response, final FileCacheEntry cacheEntry, final boolean isServeCompressed) | |
| sendFileZeroCopy | back to summary |
|---|---|
| private NextAction sendFileZeroCopy(final FilterChainContext ctx, final HttpResponsePacket response, final FileCacheEntry cacheEntry, final boolean isServeCompressed) | |
| Modifier and Type | Field and Description |
|---|---|
| private final FilterChainContext | |
| private final FileChannel | |
| private final FileInputStream | |
| private final OutputSink | |
| private long | |
| private final HttpResponsePacket |
| Access | Constructor and Description |
|---|---|
| public | FileSendEntry(final FilterChainContext ctx, final HttpResponsePacket response, final FileInputStream fis, final FileChannel fc, final long size)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public static FileCacheFilter. | create(final FilterChainContext ctx, final HttpResponsePacket response, final File file, final long size)
|
| private void | |
| public void | onError(Throwable t)
Implements org. Invoked when an error occurs processing the request asynchronously. |
| public void | onWritePossible()
Implements org. This callback will be invoked when the requirements as dictated by writer are met. |
| private void |
| ctx | back to summary |
|---|---|
| private final FilterChainContext ctx | |
| fc | back to summary |
|---|---|
| private final FileChannel fc | |
| fis | back to summary |
|---|---|
| private final FileInputStream fis | |
| output | back to summary |
|---|---|
| private final OutputSink output | |
| remaining | back to summary |
|---|---|
| private long remaining | |
| response | back to summary |
|---|---|
| private final HttpResponsePacket response | |
| FileSendEntry | back to summary |
|---|---|
| public FileSendEntry(final FilterChainContext ctx, final HttpResponsePacket response, final FileInputStream fis, final FileChannel fc, final long size) | |
| close | back to summary |
|---|---|
| public void close() | |
| create | back to summary |
|---|---|
| public static FileCacheFilter. | |
| done | back to summary |
|---|---|
| private void done() | |
| onError | back to summary |
|---|---|
| public void onError(Throwable t) Implements org. Doc from org. Invoked when an error occurs processing the request asynchronously.
| |
| onWritePossible | back to summary |
|---|---|
| public void onWritePossible() throws Exception Implements org. Doc from org. This callback will be invoked when the requirements as dictated by writer are met.
| |
| send | back to summary |
|---|---|
| private void send() | |