Skip to content

AndyReckt/Midnight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 <feature/fix>/<title>.

To compile, run the maven command: mvn clean install


Contact

About

A BAD Redis PubSub helper which let you send full objects without need of manual serializing. Would not recommend using.

Resources

License

Stars

Watchers

Forks

Languages