Skip to content

Commit bd50e6f

Browse files
Now all javadocs pass the minimum checks (#186)
* Fixed all javadocs Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Applied suggestions Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
1 parent a012e1e commit bd50e6f

File tree

9 files changed

+31
-18
lines changed

9 files changed

+31
-18
lines changed

core/src/main/java/io/cloudevents/core/format/EventFormat.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525

2626
/**
2727
* An <a href="https://github.com/cloudevents/spec/blob/v1.0/spec.md#event-format">Event format</a>
28-
* specifies how to serialize a CloudEvent as a sequence of bytes. <br/>
28+
* specifies how to serialize a CloudEvent as a sequence of bytes.
2929
* <p>
30-
* An implementation of this interface should support all specification versions of {@link CloudEvent}. <br/>
30+
* An implementation of this interface should support all specification versions of {@link CloudEvent}.
3131
* <p>
3232
* Implementations of this interface can be registered to the {@link io.cloudevents.core.provider.EventFormatProvider} to use them.
3333
*

core/src/main/java/io/cloudevents/core/message/impl/MessageUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
public class MessageUtils {
3333

3434
/**
35-
* Common flow to parse an incoming message that could be structured or binary.<br/>
35+
* Common flow to parse an incoming message that could be structured or binary.
3636
*/
3737
public static MessageReader parseStructuredOrBinaryMessage(
3838
Supplier<String> contentTypeHeaderReader,

core/src/main/java/io/cloudevents/core/provider/EventFormatProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
import java.util.stream.StreamSupport;
2727

2828
/**
29-
* Singleton holding the discovered {@link EventFormat} implementations through {@link ServiceLoader}.<br/>
29+
* Singleton holding the discovered {@link EventFormat} implementations through {@link ServiceLoader}.
3030
* <p>
31-
* You can resolve an event format using {@code EventFormatProvider.getInstance().resolveFormat(contentType)}.<br/>
31+
* You can resolve an event format using {@code EventFormatProvider.getInstance().resolveFormat(contentType)}.
3232
* <p>
33-
* You can programmatically add a new {@link EventFormat} implementation using {@link this#registerFormat(EventFormat)}.
33+
* You can programmatically add a new {@link EventFormat} implementation using {@link #registerFormat(EventFormat)}.
3434
*/
3535
@ParametersAreNonnullByDefault
3636
public final class EventFormatProvider {

core/src/main/java/io/cloudevents/core/provider/ExtensionProvider.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
import java.util.function.Supplier;
2929

3030
/**
31-
* Singleton to materialize CloudEvent extensions as POJOs. <br/>
31+
* Singleton to materialize CloudEvent extensions as POJOs.
3232
* <p>
33-
* You can materialize an {@link Extension} POJO with {@code ExtensionProvider.getInstance().parseExtension(DistributedTracingExtension.class, event)}.<br/>
33+
* You can materialize an {@link Extension} POJO with {@code ExtensionProvider.getInstance().parseExtension(DistributedTracingExtension.class, event)}.
3434
*/
3535
@ParametersAreNonnullByDefault
3636
public final class ExtensionProvider {
@@ -64,11 +64,11 @@ public <T extends Extension> void registerExtension(Class<T> extensionClass, Sup
6464
}
6565

6666
/**
67-
* Parse an extension from the {@link CloudEventExtensions}, materializing the corresponding POJO. <br/>
67+
* Parse an extension from the {@link CloudEventExtensions}, materializing the corresponding POJO.
6868
*
69-
* @param extensionClass the class implementing {@link Extension}
69+
* @param extensionClass the class implementing {@link Extension}
7070
* @param eventExtensions the event extensions to read
71-
* @param <T> the type of the extension
71+
* @param <T> the type of the extension
7272
*/
7373
@SuppressWarnings("unchecked")
7474
@Nullable

formats/json-jackson/src/main/java/io/cloudevents/jackson/CloudEventDeserializer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232

3333
import java.io.IOException;
3434

35+
/**
36+
* Jackson {@link com.fasterxml.jackson.databind.JsonDeserializer} for {@link CloudEvent}
37+
*/
3538
public class CloudEventDeserializer extends StdDeserializer<CloudEvent> {
3639

3740
protected CloudEventDeserializer() {

formats/json-jackson/src/main/java/io/cloudevents/jackson/CloudEventSerializer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
import java.io.IOException;
3131
import java.nio.charset.StandardCharsets;
3232

33+
/**
34+
* Jackson {@link com.fasterxml.jackson.databind.JsonSerializer} for {@link CloudEvent}
35+
*/
3336
public class CloudEventSerializer extends StdSerializer<CloudEvent> {
3437

3538
private final boolean forceDataBase64Serialization;

formats/json-jackson/src/main/java/io/cloudevents/jackson/JsonFormat.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626

2727
import java.io.IOException;
2828

29+
/**
30+
* Implementation of {@link EventFormat} for <a href="https://github.com/cloudevents/spec/blob/v1.0/json-format.md">JSON event format</a>
31+
* using Jackson. This format is resolvable with {@link io.cloudevents.core.provider.EventFormatProvider} using the content type {@link #CONTENT_TYPE}.
32+
*/
2933
public final class JsonFormat implements EventFormat {
3034

3135
public static final String CONTENT_TYPE = "application/cloudevents+json";
@@ -89,6 +93,10 @@ public static SimpleModule getCloudEventJacksonModule() {
8993
return getCloudEventJacksonModule(false, false);
9094
}
9195

96+
/**
97+
* @return a JacksonModule with CloudEvent serializer/deserializer customizing the data serialization.
98+
* Look at {@link #withForceJsonDataToBase64()} and {@link #withForceNonJsonDataToString()} for more details.
99+
*/
92100
public static SimpleModule getCloudEventJacksonModule(boolean forceDataBase64Serialization, boolean forceStringSerialization) {
93101
final SimpleModule ceModule = new SimpleModule("CloudEvent");
94102
ceModule.addSerializer(CloudEvent.class, new CloudEventSerializer(forceDataBase64Serialization, forceStringSerialization));

http/vertx/src/main/java/io/cloudevents/http/vertx/VertxMessageFactory.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@ public static Future<MessageReader> createReader(HttpServerRequest request) {
5656
}
5757

5858
/**
59-
* Like {@link this#createReader(HttpServerRequest)}
60-
*
6159
* @param request
6260
* @param handler
61+
* @see #createReader(HttpServerRequest)
6362
*/
6463
public static void createReader(HttpServerRequest request, Handler<AsyncResult<MessageReader>> handler) {
6564
createReader(request).onComplete(handler);
@@ -76,7 +75,7 @@ public static Future<MessageReader> createReader(HttpClientResponse response) {
7675
}
7776

7877
/**
79-
* Like {@link this#createReader(HttpClientResponse)}
78+
* @see #createReader(HttpClientResponse)
8079
*
8180
* @param response
8281
* @param handler

kafka/src/main/java/io/cloudevents/kafka/KafkaMessageFactory.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static <K> MessageReader createReader(ConsumerRecord<K, byte[]> record) t
5454
}
5555

5656
/**
57-
* Like {@link this#createReader(ConsumerRecord)}
57+
* @see #createReader(ConsumerRecord)
5858
*/
5959
public static MessageReader createReader(Headers headers, byte[] payload) throws IllegalArgumentException {
6060
return MessageUtils.parseStructuredOrBinaryMessage(
@@ -81,21 +81,21 @@ public static <K> MessageWriter<CloudEventWriter<ProducerRecord<K, byte[]>>, Pro
8181
}
8282

8383
/**
84-
* Like {@link this#createWriter(String, Integer, Long, Object)}
84+
* @see #createWriter(String, Integer, Long, Object)
8585
*/
8686
public static <K> MessageWriter<CloudEventWriter<ProducerRecord<K, byte[]>>, ProducerRecord<K, byte[]>> createWriter(String topic, Integer partition, K key) {
8787
return createWriter(topic, partition, null, key);
8888
}
8989

9090
/**
91-
* Like {@link this#createWriter(String, Integer, Long, Object)}
91+
* @see #createWriter(String, Integer, Long, Object)
9292
*/
9393
public static <K> MessageWriter<CloudEventWriter<ProducerRecord<K, byte[]>>, ProducerRecord<K, byte[]>> createWriter(String topic, K key) {
9494
return createWriter(topic, null, null, key);
9595
}
9696

9797
/**
98-
* Like {@link this#createWriter(String, Integer, Long, Object)}
98+
* @see #createWriter(String, Integer, Long, Object)
9999
*/
100100
public static MessageWriter<CloudEventWriter<ProducerRecord<Void, byte[]>>, ProducerRecord<Void, byte[]>> createWriter(String topic) {
101101
return createWriter(topic, null, null, null);

0 commit comments

Comments
 (0)