Skip to content

Commit 2e3c94e

Browse files
committed
- add javadoc to module
- export jsonb custom adapter using module
1 parent d41c3b3 commit 2e3c94e

File tree

10 files changed

+177
-0
lines changed

10 files changed

+177
-0
lines changed

modules/jooby-trpc-avaje-jsonb/src/main/java/io/jooby/trpc/avaje/jsonb/TrpcAvajeJsonbModule.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@
1515
import io.jooby.trpc.TrpcErrorCode;
1616
import io.jooby.trpc.TrpcParser;
1717

18+
/**
19+
* Implementation of jooby-trpc using avaje-jsonb. It provides the parser, decoder, reader, and
20+
* serializer.
21+
*
22+
* <p>Usage:
23+
*
24+
* <pre>{@code
25+
* {
26+
* install(new AvajeJsonbModule());
27+
* install(new TrpcAvajeJsonbModule());
28+
* install(new TrpcModule());
29+
* }
30+
* }</pre>
31+
*
32+
* @since 4.3.0
33+
* @author edgar
34+
*/
1835
public class TrpcAvajeJsonbModule implements Extension {
1936
@Override
2037
public void install(@NonNull Jooby application) throws Exception {

modules/jooby-trpc-avaje-jsonb/src/main/java/io/jooby/trpc/avaje/jsonb/TrpcJsonbExtension.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
import io.jooby.internal.trpc.avaje.jsonb.AvajeTrpcResponseAdapter;
1111
import io.jooby.trpc.TrpcResponse;
1212

13+
/**
14+
* Custom adapter for {@link TrpcResponse}.
15+
*
16+
* @since 4.3.0
17+
* @author edgar
18+
*/
1319
public class TrpcJsonbExtension implements JsonbComponent {
1420
@Override
1521
public void register(Jsonb.Builder jsonb) {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Implementation of jooby-trpc using avaje-jsonb. It provides the parser, decoder, reader, and
3+
* serializer.
4+
*
5+
* <p>Usage:
6+
*
7+
* <pre>{@code
8+
* {
9+
* install(new AvajeJsonbModule());
10+
* install(new TrpcAvajeJsonbModule());
11+
* install(new TrpcModule());
12+
* }
13+
* }</pre>
14+
*
15+
* @since 4.3.0
16+
* @author edgar
17+
*/
18+
@edu.umd.cs.findbugs.annotations.ReturnValuesAreNonnullByDefault
19+
package io.jooby.trpc.avaje.jsonb;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Implementation of jooby-trpc using avaje-jsonb. It provides the parser, decoder, reader, and
3+
* serializer.
4+
*
5+
* <p>Usage:
6+
*
7+
* <pre>{@code
8+
* {
9+
* install(new AvajeJsonbModule());
10+
* install(new TrpcAvajeJsonbModule());
11+
* install(new TrpcModule());
12+
* }
13+
* }</pre>
14+
*
15+
* @since 4.3.0
16+
* @author edgar
17+
*/
18+
module io.jooby.trpc.avaje.jsonb {
19+
exports io.jooby.trpc.avaje.jsonb;
20+
21+
requires io.jooby;
22+
requires io.jooby.trpc;
23+
requires static com.github.spotbugs.annotations;
24+
requires typesafe.config;
25+
requires io.avaje.jsonb;
26+
27+
provides io.avaje.jsonb.spi.JsonbComponent with
28+
io.jooby.trpc.avaje.jsonb.TrpcJsonbExtension;
29+
}

modules/jooby-trpc-jackson2/src/main/java/io/jooby/trpc/jackson2/TrpcJackson2Module.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,23 @@
1616
import io.jooby.trpc.TrpcParser;
1717
import io.jooby.trpc.TrpcResponse;
1818

19+
/**
20+
* Implementation of jooby-trpc using Jackson 2.x. It provides the parser, decoder, reader, and
21+
* serializer.
22+
*
23+
* <p>Usage:
24+
*
25+
* <pre>{@code
26+
* {
27+
* install(new JacksonModule());
28+
* install(new TrpcJackson2Module());
29+
* install(new TrpcModule());
30+
* }
31+
* }</pre>
32+
*
33+
* @since 4.3.0
34+
* @author edgar
35+
*/
1936
public class TrpcJackson2Module implements Extension {
2037
@Override
2138
public void install(@NonNull Jooby application) throws Exception {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Implementation of jooby-trpc using Jackson 2.x. It provides the parser, decoder, reader, and
3+
* serializer.
4+
*
5+
* <p>Usage:
6+
*
7+
* <pre>{@code
8+
* {
9+
* install(new JacksonModule());
10+
* install(new TrpcJackson2Module());
11+
* install(new TrpcModule());
12+
* }
13+
* }</pre>
14+
*
15+
* @since 4.3.0
16+
* @author edgar
17+
*/
18+
@edu.umd.cs.findbugs.annotations.ReturnValuesAreNonnullByDefault
19+
package io.jooby.trpc.jackson2;

modules/jooby-trpc-jackson2/src/main/java/module-info.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/**
2+
* Implementation of jooby-trpc using Jackson 2.x. It provides the parser, decoder, reader, and
3+
* serializer.
4+
*
5+
* <p>Usage:
6+
*
7+
* <pre>{@code
8+
* {
9+
* install(new JacksonModule());
10+
* install(new TrpcJackson2Module());
11+
* install(new TrpcModule());
12+
* }
13+
* }</pre>
14+
*
15+
* @since 4.3.0
16+
* @author edgar
17+
*/
118
module io.jooby.trpc.jackson2 {
219
exports io.jooby.trpc.jackson2;
320

modules/jooby-trpc-jackson3/src/main/java/io/jooby/trpc/jackson3/TrpcJackson3Module.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,23 @@
2020
import tools.jackson.databind.exc.MismatchedInputException;
2121
import tools.jackson.databind.module.SimpleModule;
2222

23+
/**
24+
* Implementation of jooby-trpc using Jackson 3.x. It provides the parser, decoder, reader, and
25+
* serializer.
26+
*
27+
* <p>Usage:
28+
*
29+
* <pre>{@code
30+
* {
31+
* install(new Jackson3Module());
32+
* install(new TrpcJackson3Module());
33+
* install(new TrpcModule());
34+
* }
35+
* }</pre>
36+
*
37+
* @since 4.3.0
38+
* @author edgar
39+
*/
2340
public class TrpcJackson3Module implements Extension {
2441
@Override
2542
public void install(@NonNull Jooby application) {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Implementation of jooby-trpc using Jackson 3.x. It provides the parser, decoder, reader, and
3+
* serializer.
4+
*
5+
* <p>Usage:
6+
*
7+
* <pre>{@code
8+
* {
9+
* install(new Jackson3Module());
10+
* install(new TrpcJackson3Module());
11+
* install(new TrpcModule());
12+
* }
13+
* }</pre>
14+
*
15+
* @since 4.3.0
16+
* @author edgar
17+
*/
18+
@edu.umd.cs.findbugs.annotations.ReturnValuesAreNonnullByDefault
19+
package io.jooby.trpc.jackson3;

modules/jooby-trpc-jackson3/src/main/java/module-info.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/**
2+
* Implementation of jooby-trpc using Jackson 3.x. It provides the parser, decoder, reader, and
3+
* serializer.
4+
*
5+
* <p>Usage:
6+
*
7+
* <pre>{@code
8+
* {
9+
* install(new Jackson3Module());
10+
* install(new TrpcJackson3Module());
11+
* install(new TrpcModule());
12+
* }
13+
* }</pre>
14+
*
15+
* @since 4.3.0
16+
* @author edgar
17+
*/
118
module io.jooby.trpc.jackson3 {
219
exports io.jooby.trpc.jackson3;
320

0 commit comments

Comments
 (0)