Package org.kohsuke.github
Class GitHubRateLimitHandler
- java.lang.Object
-
- org.kohsuke.github.GitHubRateLimitHandler
-
- Direct Known Subclasses:
RateLimitHandler
public abstract class GitHubRateLimitHandler extends Object
Pluggable strategy to determine what to do when the API rate limit is reached.- Author:
- Kohsuke Kawaguchi, Liam Newman
- See Also:
GitHubBuilder#withRateLimitHandler(RateLimitHandler),GitHubAbuseLimitHandler
-
-
Constructor Summary
Constructors Constructor Description GitHubRateLimitHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidonError(GitHubConnectorResponse connectorResponse)Called when the library encounters HTTP error indicating that the API rate limit has been exceeded.
-
-
-
Method Detail
-
onError
public abstract void onError(@Nonnull GitHubConnectorResponse connectorResponse) throws IOException
Called when the library encounters HTTP error indicating that the API rate limit has been exceeded.Any exception thrown from this method will cause the request to fail, and the caller of github-api will receive an exception. If this method returns normally, another request will be attempted. For that to make sense, the implementation needs to wait for some time.
- Parameters:
connectorResponse- Response information for this request.- Throws:
IOException- the io exception- See Also:
- API documentation from GitHub
-
-