-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add coroutines support. * simplify. * simplify artifact-ids in gradle.properties. * seperate the codec.
- Loading branch information
Showing
31 changed files
with
438 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
artifact-id=codec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
dependencies { | ||
compileOnly(project(":codec")) | ||
|
||
compileOnly(libs.caffeine) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
package net.infumia.pubsub; | ||
|
||
import java.util.function.Consumer; | ||
|
||
/** | ||
* The interface for handling Pub/Sub messages of type {@link T}. | ||
* | ||
* @param <T> the type of the message to be handled. | ||
*/ | ||
public interface Handler<T> { | ||
public interface Handler<T> extends Consumer<T> { | ||
/** | ||
* Retrieves the class type of the message being handled. | ||
* | ||
* @return the {@link Class} object representing the type {@link T}. | ||
*/ | ||
Class<T> type(); | ||
|
||
/** | ||
* Handles a message of type {@link T} received from Pub/Sub. | ||
* | ||
* @param t the message to handle. | ||
*/ | ||
void handle(T t); | ||
} |
20 changes: 0 additions & 20 deletions
20
common/src/main/java/net/infumia/pubsub/HandlerToResponder.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
package net.infumia.pubsub; | ||
|
||
import java.util.function.Function; | ||
|
||
/** | ||
* The interface for handling Pub/Sub messages of type {@code T} and providing a response of type {@code Y}. | ||
* | ||
* @param <T> the type of the message to be handled. | ||
* @param <Y> the type of the response. | ||
*/ | ||
public interface Responder<T, Y> { | ||
public interface Responder<T, Y> extends Function<T, Y> { | ||
|
||
/** | ||
* Retrieves the class type of the message being handled. | ||
* | ||
* @return the {@link Class} object representing the type {@link T}. | ||
*/ | ||
Class<T> type(); | ||
|
||
/** | ||
* Handles a message of type {@link T} received from Pub/Sub and provides a response of type {@link Y}. | ||
* | ||
* @param t the message to handle. | ||
* @return the response of type {@link Y}. | ||
*/ | ||
Y handle(T t); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
dependencies { | ||
compileOnly(project(":common")) | ||
compileOnly(project(":codec")) | ||
|
||
compileOnly(libs.jackson) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
artifact-id=pubsub-jackson | ||
artifact-id=jackson |
Oops, something went wrong.