Java¶
Introduction¶
Clients are generated with the prime-client-java-feign template. The generated code makes use of some interfaces to support extension modules.
Libraries¶
Name | Description | Version | Javadoc |
---|---|---|---|
io.github.primelib:jira4j-rest-v2 | JIRA REST | ||
io.github.primelib:jira4j-rest-v3 | JIRA REST | ||
io.github.primelib:confluence4j-rest-v1 | Confluence REST | ||
io.github.primelib:confluence4j-rest-v2 | Confluence REST | ||
io.github.primelib:pagerduty4j-events-v2 | PagerDuty Events | ||
io.github.primelib:pagerduty4j-rest | PagerDuty REST | ||
io.github.primelib:prometheus4j | Prometheus API | ||
io.github.primelib:webmethodsapigateway4j | Prometheus API | ||
io.github.primelib:perspective4j | perspectiveapi.com |
Extensions¶
First add the bom
to use the latest version of the extensions.
implementation("io.github.primelib.primecodegenlib.java:bom:<version>")
The source code for java extensions is available on GitHub.
Reslience4J¶
The Reslience4J
extension will decorate api invocations with various features. (e.g. CircuitBreaker, RateLimiter, Retry, Bulkhead, ...)
implementation("io.github.primelib.primecodegenlib.java:feign-resilience4j")
ApiName client = ApiNameFactory.create(spec -> {
...
spec.registerExtension(new Resilience4JExtension());
...
});
Blackbird¶
The BlackbirdExtension
will add jackson-blackbird
to the Jackson ObjectMapper used by the Feign Client.
implementation("io.github.primelib.primecodegenlib.java:feign-blackbird")
ApiName client = ApiNameFactory.create(spec -> {
...
spec.registerExtension(new BlackbirdExtension());
...
});