Class CodecRegistry

java.lang.Object
com.zenith.network.codec.CodecRegistry

public class CodecRegistry extends Object
  • Constructor Details

    • CodecRegistry

      public CodecRegistry(String id)
  • Method Details

    • register

      public void register(PacketHandlerCodec codec)
    • unregister

      public void unregister(PacketHandlerCodec codec)
    • getCodec

      public PacketHandlerCodec getCodec(String id)
    • getCodecIds

      public List<String> getCodecIds()
    • handleInbound

      public <P extends Packet, S extends Session> P handleInbound(@Nullable P packet, @NonNull S session)
    • handleOutgoing

      public <P extends Packet, S extends Session> P handleOutgoing(@Nullable P packet, @NonNull S session)
    • handlePostOutgoing

      public <P extends Packet, S extends Session> void handlePostOutgoing(@Nullable P packet, @NonNull S session)
    • getCodecs

      Codecs are invoked similar to the netty pipeline For inbound packets, higher priority codecs are invoked first For outbound packets, lower priority codecs are invoked first
    • getId

      public String getId()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object