Midnight
A Java Redis PubSub helper which let you send full objects without need of manual serializing.
Credit goes to Joeleoli's Pidgin for the original idea of this, and to ThatKawaiiSam for the readme.
How to setup
Create the midnight instance
public class ExampleClass {
public static void main(final String[] args) {
// Create ur JedisPool
JedisPool pool = new JedisPool("localhost", 6379);
// Start the instance
Midnight midnight = new Midnight(pool);
}
}
Registering a class
midnight.registerObject(ExampleObject.class);
midnight.registerListener(new ExampleSubscriber());
Sending an object
midnight.sendObject(new ExampleObject("exampleParameter"));
Examples
Main Class | Example Object | Example Listener
Contributing
When contributing, please create a pull request with the branch named as follows
To compile, run the maven command:
mvn clean install
Contact
- Discord: AndyReckt#0001
- Telegram: AndyReckt