@Immutable public final class RetryCarefulWire extends Object implements com.jcabi.http.Wire
IOException
retries a few
times before giving up and rethrowing the exception.
Just a wrapper for a RetryWire
that wraps a
CarefulWire
that wraps the underlying wire.
You can use RetryCarefulWire
with a
Github
object:
Github github = new RtGithub(
new RtGithub().entry().through(RetryCarefulWire.class, 50)
);
Constructor and Description |
---|
RetryCarefulWire(com.jcabi.http.Wire wire,
int threshold)
Public ctor.
|
Modifier and Type | Method and Description |
---|---|
com.jcabi.http.Response |
send(com.jcabi.http.Request req,
String home,
String method,
Collection<Map.Entry<String,String>> headers,
InputStream content,
int connect,
int read) |
public RetryCarefulWire(com.jcabi.http.Wire wire, int threshold)
wire
- Original wirethreshold
- Threshold of number of remaining requests, below which
requests are blocked until resetpublic com.jcabi.http.Response send(com.jcabi.http.Request req, String home, String method, Collection<Map.Entry<String,String>> headers, InputStream content, int connect, int read) throws IOException
send
in interface com.jcabi.http.Wire
IOException
Copyright © 2012–2018 jcabi.com. All rights reserved.