Class FileResourceFetcher
- java.lang.Object
-
- io.apiman.gateway.engine.vertx.polling.fetchers.FileResourceFetcher
-
- All Implemented Interfaces:
ResourceFetcher
public class FileResourceFetcher extends Object implements ResourceFetcher
Fetch a file from the local filesystem.- Author:
- Marc Savy <marc@rhymewithgravy.com>
-
-
Constructor Summary
Constructors Constructor Description FileResourceFetcher(io.vertx.core.Vertx vertx, URI uri, Map<String,String> config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileResourceFetcherexceptionHandler(io.vertx.core.Handler<Throwable> exceptionHandler)Set an exception handler, invoked in an error occurs.voidfetch(io.vertx.core.Handler<io.vertx.core.buffer.Buffer> resultHandler)Fetch a resource and return its content via the resultHandler
-
-
-
Method Detail
-
fetch
public void fetch(io.vertx.core.Handler<io.vertx.core.buffer.Buffer> resultHandler)
Description copied from interface:ResourceFetcherFetch a resource and return its content via the resultHandler- Specified by:
fetchin interfaceResourceFetcher- Parameters:
resultHandler- the result handler
-
exceptionHandler
public FileResourceFetcher exceptionHandler(io.vertx.core.Handler<Throwable> exceptionHandler)
Description copied from interface:ResourceFetcherSet an exception handler, invoked in an error occurs.- Specified by:
exceptionHandlerin interfaceResourceFetcher- Parameters:
exceptionHandler- the exception handler- Returns:
- fluent
-
-