Package ai.preferred.venom.request
Interface Unwrappable
-
- All Superinterfaces:
Request
- All Known Implementing Classes:
CrawlerRequest
,HttpFetcherRequest
,StorageFetcherRequest
public interface Unwrappable extends Request
This interface represents that the request can be unwrapped.- Author:
- Ween Jiann Lee
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ai.preferred.venom.request.Request
Request.Method
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Request
getInner()
Returns the unwrapped version of this request.static @NotNull Request
unwrapRequest(@NotNull Request request)
Unwrap all wrapped request to an instance of base request.-
Methods inherited from interface ai.preferred.venom.request.Request
getBody, getHeaders, getMethod, getProxy, getSleepScheduler, getUrl
-
-
-
-
Method Detail
-
unwrapRequest
@NotNull static @NotNull Request unwrapRequest(@NotNull @NotNull Request request)
Unwrap all wrapped request to an instance of base request.- Parameters:
request
- any implementation ofRequest
.- Returns:
- the first instance of request not implementing
Unwrappable
.
-
getInner
@NotNull @NotNull Request getInner()
Returns the unwrapped version of this request.- Returns:
- an instance of request
-
-