Package ai.preferred.venom.fetcher
Interface Fetcher
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
AsyncFetcher,StorageFetcher
public interface Fetcher extends java.lang.AutoCloseableThis interface represents only the most basic of fetching a request. It imposes no restrictions or particular details on the request execution process and leaves the specifics of proxy management, validation and response status handling up to individual implementations.- Author:
- Maksim Tkachenko, Truong Quoc Tuan, Ween Jiann Lee
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull java.util.concurrent.Future<Response>fetch(@NotNull Request request)Fetch the desired HTTP page given inRequest.@NotNull java.util.concurrent.Future<Response>fetch(@NotNull Request request, @NotNull Callback callback)Fetch the desired HTTP page given inRequest.voidstart()Fetcher starter.
-
-
-
Method Detail
-
start
void start()
Fetcher starter.
-
fetch
@NotNull @NotNull java.util.concurrent.Future<Response> fetch(@NotNull @NotNull Request request)
Fetch the desired HTTP page given inRequest.- Parameters:
request- information for the page to fetch.- Returns:
- Response future
-
fetch
@NotNull @NotNull java.util.concurrent.Future<Response> fetch(@NotNull @NotNull Request request, @NotNull @NotNull Callback callback)
Fetch the desired HTTP page given inRequest. Executes callback upon completion.- Parameters:
request- information for the page to fetch.callback- callback- Returns:
- Response future
-
-