Skip to content

Commit 5ac7c6d

Browse files
Javadoc on site (kroxylicious#3534)
* Add on-site javadoc generation for public API modules Creates a new javadoc aggregator submodule under kroxylicious-docs that generates unified javadocs for the public API modules. The javadocs will now be hosted on-site instead of relying on javadoc.io, and are integrated into the existing documentation release pipeline. Webify.java has been extended to support copying arbitrary directories, enabling the javadoc output to be included in the website build. * Tweak/tidy up package-info.java I deleted kroxylicious-api/src/main/java/io/kroxylicious/proxy/package-info.java because this package contains only other packages. Documenting that ends up looking pretty weird in the Javadocs, and it's simply not necessary to have it for any other reason. * docs: make kroxylicious-docs depend on kroxylicious-api-javadoc Why: We need the javadoc report generated before we run webify. Currently maven builds them in the other order because kroxylicious-docs is the parent of api-javadoc. So this makes kroxylicious-parent the parent of api-javadoc and puts a provided dependency from docs -> api-javadoc to ensure they build in the right order. Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com> Co-authored-by: Robert Young <robertyoungnz@gmail.com> Signed-off-by: Tom Bentley <tbentley@redhat.com> Signed-off-by: Robert Young <robertyoungnz@gmail.com>
1 parent 50bb1bf commit 5ac7c6d

19 files changed

Lines changed: 254 additions & 54 deletions

File tree

.github/workflows/publish-snapshot-docs-to-website.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
working-directory: kroxylicious
6868

6969
- name: Build with Maven
70-
run: mvn -Dquick -P dist package --pl kroxylicious-docs
70+
run: mvn -Dquick -P dist package --pl kroxylicious-docs --am
7171
working-directory: kroxylicious
7272

7373
- name: Checkout Website

kroxylicious-api/src/main/java/io/kroxylicious/proxy/config/secret/package-info.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
* Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
55
*/
66

7+
/**
8+
* <p>Abstraction for providing passwords to proxy configuration.</p>
9+
* <p>{@link io.kroxylicious.proxy.config.secret.PasswordProvider} implementations allow
10+
* passwords to be sourced from different locations (inline in configuration, external files).
11+
* This enables separation of sensitive data from configuration files.</p>
12+
*/
713
@ReturnValuesAreNonnullByDefault
814
@DefaultAnnotationForParameters(NonNull.class)
915
@DefaultAnnotation(NonNull.class)

kroxylicious-api/src/main/java/io/kroxylicious/proxy/config/tls/package-info.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
* Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
55
*/
66

7+
/**
8+
* <p>TLS configuration for proxy connections to clients and upstream clusters.</p>
9+
* <p>These configuration classes define keystores, trust stores, and TLS options
10+
* for both server-side (client connections) and client-side (upstream cluster connections) TLS.</p>
11+
*/
712
@ReturnValuesAreNonnullByDefault
813
@DefaultAnnotationForParameters(NonNull.class)
914
@DefaultAnnotation(NonNull.class)

kroxylicious-api/src/main/java/io/kroxylicious/proxy/filter/filterresultbuilder/package-info.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
* Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
55
*/
66

7+
/**
8+
* <p>Builder API for constructing filter results.</p>
9+
* <p>Filters use these builders (obtained from {@link io.kroxylicious.proxy.filter.FilterContext})
10+
* to construct {@link io.kroxylicious.proxy.filter.FilterResult} instances that control
11+
* message forwarding, dropping, short-circuiting, and connection management.</p>
12+
*/
713
@ReturnValuesAreNonnullByDefault
814
@DefaultAnnotationForParameters(NonNull.class)
915
@DefaultAnnotation(NonNull.class)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright Kroxylicious Authors.
3+
*
4+
* Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
5+
*/
6+
7+
/**
8+
* <p>APIs for resolving topic IDs to topic names and handling metadata-related errors.</p>
9+
* <p>Filters that need to translate topic IDs (e.g., from Fetch requests) to topic names
10+
* can use {@link io.kroxylicious.proxy.filter.metadata.TopicNameMapping} to represent
11+
* the results of such resolution, including handling of partial failures.</p>
12+
*/
13+
@ReturnValuesAreNonnullByDefault
14+
@DefaultAnnotationForParameters(NonNull.class)
15+
@DefaultAnnotation(NonNull.class)
16+
package io.kroxylicious.proxy.filter.metadata;
17+
18+
import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
19+
import edu.umd.cs.findbugs.annotations.DefaultAnnotationForParameters;
20+
import edu.umd.cs.findbugs.annotations.NonNull;
21+
import edu.umd.cs.findbugs.annotations.ReturnValuesAreNonnullByDefault;

kroxylicious-api/src/main/java/io/kroxylicious/proxy/filter/package-info.java

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,37 @@
55
*/
66

77
/**
8+
* <p>The protocol filter API.</p>
9+
*
10+
* <p>An interface is provided for each kind of request and response in the Kafka protocol, e.g. {@link io.kroxylicious.proxy.filter.ProduceRequestFilter}.
11+
* Protocol Filter implementations inherit whichever of the per-RPC interfaces they need to intercept.
12+
* They can inherit multiple interfaces if necessary.
13+
* For filters which needs to intercept most or all of the protocol it is more convenient to inherit
14+
* {@link io.kroxylicious.proxy.filter.RequestFilter} and/or {@link io.kroxylicious.proxy.filter.ResponseFilter}.</p>
15+
*
16+
* <h2 id='assumptions'>Important facts about the Kafka protocol</h2>
17+
*
18+
* <h3 id='pipelining'>Pipelining</h3>
19+
* <p>The Kafka protocol supports pipelining (meaning a client can send multiple requests,
20+
* before getting a response for any of them). Therefore when writing a filter implementation
21+
* do not assume you won't see multiple requests before seeing any corresponding responses.</p>
22+
*
23+
* <h3 id='ordering'>Ordering</h3>
24+
* <p>A broker does not, in general, send responses in the same order as it receives requests.
25+
* Therefore when writing a filter implementation do not assume ordering.</p>
26+
*
27+
* <h3 id='local_view'>Local view</h3>
28+
* <p>A client may obtain information from one broker in a cluster and use it to interact with other
29+
* brokers in the cluster (or the same broker, but on a different connection, and therefore a different
30+
* channel and filter chain). A classic example would
31+
* be a producer or consumer making a metadata connection and {@code Metadata} request to a broker and
32+
* then connecting to a partition leader to producer/consume records ({@code Produce} and {@code Fetch} requests).</p>
33+
*
34+
* <p>So although your filter
35+
* <em>implementation</em> might intercept both {@code Metadata} and {@code Produce} request/response
36+
* (for example), those requests will not pass through the same <em>instance</em> of your filter
37+
* implementation. Therefore it is incorrect, in general, to assume your filter has a global view of
38+
* the communication between the client and broker.</p>
839
*
940
* <h2 id='implementing'>Implementing Filters</h2>
1041
*

kroxylicious-api/src/main/java/io/kroxylicious/proxy/package-info.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

kroxylicious-api/src/main/java/io/kroxylicious/proxy/plugin/Plugin.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,8 @@
2020
@Retention(RetentionPolicy.RUNTIME)
2121
@Target(ElementType.TYPE)
2222
public @interface Plugin {
23+
/**
24+
* @return The type of configuration associated with the plugin implementation.
25+
*/
2326
Class<?> configType();
2427
}

kroxylicious-api/src/main/java/io/kroxylicious/proxy/plugin/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
/**
8-
* API for defining plugins within configurtion.
8+
* API for defining plugins within configuration.
99
*
1010
* <h2>Terminology</h2>
1111
* <p>A <em>plugin interface</em> is a Java {@code interface} (or possibly a {@code class)} that can be used

kroxylicious-authorizer-api/src/main/java/io/kroxylicious/authorizer/service/ResourceType.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* For this reason, implementations of this interface should be named for the type of resource
1616
* (for example {@code Topic}, or {@code ConsumerGroup}) rather than the operations
1717
* enumerated (so not {@code TopicOperations} or {@code ConsumerGroupOperations}).
18+
* The elements of the enumeration are typically verbs, such as {@code READ},
19+
* {@code WRITE}, {@code DELETE}, {@code CREATE}, and so on.
1820
* @param <S> The self type.
1921
*/
2022
public interface ResourceType<S extends Enum<S> & ResourceType<S>> {

0 commit comments

Comments
 (0)