public class ClientDownloadFilter extends BaseFilter
| Constructor and Description |
|---|
ClientDownloadFilter(URI uri,
FutureImpl<String> completeFuture)
ClientDownloadFilter constructor
|
| Modifier and Type | Method and Description |
|---|---|
NextAction |
handleClose(FilterChainContext ctx)
The method is called, when the client connection will get closed.
|
NextAction |
handleConnect(FilterChainContext ctx)
The method is called, when a client connection gets connected to a web
server.
|
NextAction |
handleRead(FilterChainContext ctx)
The method is called, when we receive a
HttpContent from a server. |
createContext, exceptionOccurred, handleAccept, handleEvent, handleWrite, onAdded, onFilterChainChanged, onRemoved, toStringpublic ClientDownloadFilter(URI uri, FutureImpl<String> completeFuture)
uri - URI of a remote resource to downloadcompleteFuture - download completion handler (FutureImpl)public NextAction handleConnect(FilterChainContext ctx) throws IOException
handleConnect in interface FilterhandleConnect in class BaseFilterctx - Client connect processing contextNextActionIOExceptionpublic NextAction handleRead(FilterChainContext ctx) throws IOException
HttpContent from a server.
Once we receive one - we save the content chunk to a local file.handleRead in interface FilterhandleRead in class BaseFilterctx - Request processing contextNextActionIOExceptionpublic NextAction handleClose(FilterChainContext ctx) throws IOException
handleClose in interface FilterhandleClose in class BaseFilterctx - Request processing contextNextActionIOExceptionCopyright © 2024 Oracle Corporation. All rights reserved.