Skip to content
Permalink
Browse files

added javadocs, v4.2.4

  • Loading branch information
sitfoxfly committed Nov 12, 2019
1 parent 369a4a2 commit a2ff67377fe47f839163903ddc01b4d19fb49ed1
Showing with 16 additions and 1 deletion.
  1. +3 −1 checkstyle.xml
  2. +13 −0 src/main/java/ai/preferred/venom/fetcher/AsyncFetcher.java
@@ -63,7 +63,9 @@

<!-- Checks whether files end with a new line. -->
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
<module name="NewlineAtEndOfFile"/>
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf"/>
</module>

<!-- Checks that property files contain the same keys. -->
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
@@ -132,12 +132,25 @@
*/
private final boolean compressed;

/**
* Creates {@link BasicFuture} and fails the request with a specified exception.
*
* @param callback request callback
* @param ex specified exeption
* @return BasicFuture created
*/
private static Future<Response> failRequest(final FutureCallback<Response> callback, final Exception ex) {
final BasicFuture<Response> f = new BasicFuture<>(callback);
f.failed(ex);
return f;
}

/**
* Creates {@link BasicFuture} and cancels the request.
*
* @param callback request callback
* @return BasicFuture created
*/
private static Future<Response> cancelRequest(final FutureCallback<Response> callback) {
final BasicFuture<Response> f = new BasicFuture<>(callback);
f.cancel(true);

0 comments on commit a2ff673

Please sign in to comment.
You can’t perform that action at this time.