class IndexedMessageCodec.MessageHandler<MSG>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Optional<java.util.function.Function<PacketBuffer,MSG>> |
decoder |
private java.util.Optional<java.util.function.BiConsumer<MSG,PacketBuffer>> |
encoder |
private int |
index |
private java.util.Optional<java.util.function.Function<MSG,java.lang.Integer>> |
loginIndexGetter |
private java.util.Optional<java.util.function.BiConsumer<MSG,java.lang.Integer>> |
loginIndexSetter |
private java.util.function.BiConsumer<MSG,java.util.function.Supplier<NetworkEvent.Context>> |
messageConsumer |
private java.lang.Class<MSG> |
messageType |
private java.util.Optional<NetworkDirection> |
networkDirection |
Constructor and Description |
---|
MessageHandler(int index,
java.lang.Class<MSG> messageType,
java.util.function.BiConsumer<MSG,PacketBuffer> encoder,
java.util.function.Function<PacketBuffer,MSG> decoder,
java.util.function.BiConsumer<MSG,java.util.function.Supplier<NetworkEvent.Context>> messageConsumer,
java.util.Optional<NetworkDirection> networkDirection) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.util.function.Function<MSG,java.lang.Integer>> |
getLoginIndexGetter() |
(package private) java.util.Optional<java.util.function.BiConsumer<MSG,java.lang.Integer>> |
getLoginIndexSetter() |
(package private) MSG |
newInstance() |
(package private) void |
setLoginIndexGetter(java.util.function.Function<MSG,java.lang.Integer> loginIndexGetter) |
(package private) void |
setLoginIndexSetter(java.util.function.BiConsumer<MSG,java.lang.Integer> loginIndexSetter) |
private final java.util.Optional<java.util.function.BiConsumer<MSG,PacketBuffer>> encoder
private final java.util.Optional<java.util.function.Function<PacketBuffer,MSG>> decoder
private final int index
private final java.util.function.BiConsumer<MSG,java.util.function.Supplier<NetworkEvent.Context>> messageConsumer
private final java.lang.Class<MSG> messageType
private final java.util.Optional<NetworkDirection> networkDirection
private java.util.Optional<java.util.function.BiConsumer<MSG,java.lang.Integer>> loginIndexSetter
private java.util.Optional<java.util.function.Function<MSG,java.lang.Integer>> loginIndexGetter
public MessageHandler(int index, java.lang.Class<MSG> messageType, java.util.function.BiConsumer<MSG,PacketBuffer> encoder, java.util.function.Function<PacketBuffer,MSG> decoder, java.util.function.BiConsumer<MSG,java.util.function.Supplier<NetworkEvent.Context>> messageConsumer, java.util.Optional<NetworkDirection> networkDirection)
void setLoginIndexSetter(java.util.function.BiConsumer<MSG,java.lang.Integer> loginIndexSetter)
java.util.Optional<java.util.function.BiConsumer<MSG,java.lang.Integer>> getLoginIndexSetter()
void setLoginIndexGetter(java.util.function.Function<MSG,java.lang.Integer> loginIndexGetter)
public java.util.Optional<java.util.function.Function<MSG,java.lang.Integer>> getLoginIndexGetter()
MSG newInstance()