ThatKawaiiSam / Pyrite

⛓ Simple utility to streamline integrating Redis into your Java applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pyrite

Jedis Packet Library.


Setup Pyrite + Send Packet

// Setup
Pyrite pyrite = new Pyrite(
    new PyriteCredentials("localhost", "", 6379)
);

// Register Container
pyrite.registerContainer(new ExamplePacketContainer());

// Send Packet
pyrite.sendPacket(new ExamplePacket(), "Channel");

Example Packet

public class ExamplePacket extends Packet {

    private int field1 = 1;
    private String field2 = "Howdy there!";

}

Example Packet Container

import io.github.thatkawaiisam.pyrite.packet.PacketContainer;
import io.github.thatkawaiisam.pyrite.packet.PacketListener;

public class ExamplePacketContainer implements PacketContainer {

    @PacketListener
    public void onTestPacket(ExamplePacket packet) {
        System.out.println("Packet Recieved!");
        System.out.println("====================");
        System.out.println("Field1: " + packet.getField1());
        System.out.println("Field2: " + packet.getField2());
    }

}

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

To run unit tests, run the maven command mvn test


Contact

  • Discord: ThatKawaiiSam#2882
  • Telegram: ThatKawaiiSam

About

⛓ Simple utility to streamline integrating Redis into your Java applications

License:GNU General Public License v3.0


Languages

Language:Java 100.0%