Interface ResourceFetcher
-
- All Known Implementing Classes:
FileResourceFetcher,HttpResourceFetcher
public interface ResourceFetcherInterface for asynchronously fetching simple remote resources, for instance via HTTP or local file-system.
Any exceptions are returned via
exceptionHandler(Handler), which the user should set if they are interested in handling errors.- Author:
- Marc Savy <marc@rhymewithgravy.com>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResourceFetcherexceptionHandler(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
void fetch(io.vertx.core.Handler<io.vertx.core.buffer.Buffer> resultHandler)
Fetch a resource and return its content via the resultHandler- Parameters:
resultHandler- the result handler
-
exceptionHandler
ResourceFetcher exceptionHandler(io.vertx.core.Handler<Throwable> exceptionHandler)
Set an exception handler, invoked in an error occurs.- Parameters:
exceptionHandler- the exception handler- Returns:
- fluent
-
-