Interface SimpleConnection<BASE>
- All Known Subinterfaces:
SimpleChannel.ProtocolFactory<BUF,
,BASE> SimpleFlow<BUF,
,BASE> SimpleHandlerFlow<BUF,
,BASE> SimpleHandlerProtocol<BUF,
,BASE> SimpleProtocol<BUF,
BASE>
- All Known Implementing Classes:
SimpleChannel
,SimpleChannel.Flow
,SimpleChannel.HandlerFlow
,SimpleChannel.HandlerProtocol
,SimpleChannel.Protocol
public interface SimpleConnection<BASE>
-
Method Summary
Modifier and TypeMethodDescriptiondefault SimpleProtocol
<FriendlyByteBuf, BASE> any()
Creates a builder grouping together packets that are valid under any protocol.default <CTX,
NEWBASE extends SimplePacket<CTX>>
SimpleHandlerProtocol<FriendlyByteBuf, NEWBASE> any
(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are valid under any protocol.default <CTX,
NEWBASE extends SimplePacket<CTX>>
SimpleConnection<BASE> any
(io.netty.util.AttributeKey<CTX> context, Consumer<SimpleHandlerProtocol<FriendlyByteBuf, NEWBASE>> consumer) Consumer version ofany(AttributeKey)
.default SimpleConnection
<BASE> any
(Consumer<SimpleProtocol<FriendlyByteBuf, BASE>> consumer) Consumer version ofany()
.default SimpleProtocol
<FriendlyByteBuf, BASE> Creates a builder grouping together packets that are only valid when under the Configuration protocol.default <CTX,
NEWBASE extends SimplePacket<CTX>>
SimpleHandlerProtocol<FriendlyByteBuf, NEWBASE> configuration
(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are only valid when under the Configuration protocol.default <CTX,
NEWBASE extends SimplePacket<CTX>>
SimpleConnection<BASE> configuration
(io.netty.util.AttributeKey<CTX> context, Consumer<SimpleHandlerProtocol<FriendlyByteBuf, NEWBASE>> consumer) Consumer version ofconfiguration(AttributeKey)
.default SimpleConnection
<BASE> configuration
(Consumer<SimpleProtocol<FriendlyByteBuf, BASE>> consumer) Consumer version ofconfiguration()
.default SimpleProtocol
<FriendlyByteBuf, BASE> login()
Creates a builder grouping together packets that are only valid when under the Login protocol.default <CTX,
NEWBASE extends SimplePacket<CTX>>
SimpleHandlerProtocol<FriendlyByteBuf, NEWBASE> login
(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are only valid when under the Login protocol.default <CTX,
NEWBASE extends SimplePacket<CTX>>
SimpleConnection<BASE> login
(io.netty.util.AttributeKey<CTX> context, Consumer<SimpleHandlerProtocol<FriendlyByteBuf, NEWBASE>> consumer) Consumer version oflogin(AttributeKey)
.default SimpleConnection
<BASE> login
(Consumer<SimpleProtocol<FriendlyByteBuf, BASE>> consumer) Consumer version oflogin()
.default SimpleProtocol
<RegistryFriendlyByteBuf, BASE> play()
Creates a builder grouping together packets that are only valid when under the Play protocol.default <CTX,
NEWBASE extends SimplePacket<CTX>>
SimpleHandlerProtocol<RegistryFriendlyByteBuf, NEWBASE> play
(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are only valid when under the Login protocol.default <CTX,
NEWBASE extends SimplePacket<CTX>>
SimpleConnection<BASE> play
(io.netty.util.AttributeKey<CTX> context, Consumer<SimpleHandlerProtocol<RegistryFriendlyByteBuf, NEWBASE>> consumer) Consumer version ofplay(AttributeKey)
.default SimpleConnection
<BASE> play
(Consumer<SimpleProtocol<RegistryFriendlyByteBuf, BASE>> consumer) Consumer version ofplay()
.default <BUF extends FriendlyByteBuf,
CTX, NEWBASE extends SimplePacket<CTX>>
SimpleConnection<BASE> protocol
(io.netty.util.AttributeKey<CTX> context, NetworkProtocol<BUF> protocol, Consumer<SimpleHandlerProtocol<BUF, NEWBASE>> consumer) Consumer version ofprotocol(AttributeKey,NetworkProtocol)
.<NEWBUF extends FriendlyByteBuf,
CTX, NEWBASE extends SimplePacket<CTX>>
SimpleHandlerProtocol<NEWBUF, NEWBASE> protocol
(io.netty.util.AttributeKey<CTX> context, NetworkProtocol<NEWBUF> protocol) Creates a builder grouping together all packets under the same protocol.default <BUF extends FriendlyByteBuf>
SimpleConnection<BASE> protocol
(NetworkProtocol<BUF> protocol, Consumer<SimpleProtocol<BUF, BASE>> consumer) Consumer version ofprotocol(NetworkProtocol)
.<NEWBUF extends FriendlyByteBuf,
NEWBASE>
SimpleProtocol<NEWBUF, NEWBASE> protocol
(NetworkProtocol<NEWBUF> protocol) Creates a builder grouping together all packets under the same protocol.
-
Method Details
-
protocol
<NEWBUF extends FriendlyByteBuf,NEWBASE> SimpleProtocol<NEWBUF,NEWBASE> protocol(NetworkProtocol<NEWBUF> protocol) Creates a builder grouping together all packets under the same protocol. This will validate that the protocol matches before the packet is sent or received. -
protocol
<NEWBUF extends FriendlyByteBuf,CTX, SimpleHandlerProtocol<NEWBUF,NEWBASE extends SimplePacket<CTX>> NEWBASE> protocol(io.netty.util.AttributeKey<CTX> context, NetworkProtocol<NEWBUF> protocol) Creates a builder grouping together all packets under the same protocol. This will validate that the protocol matches before the packet is sent or received. -
protocol
default <BUF extends FriendlyByteBuf> SimpleConnection<BASE> protocol(NetworkProtocol<BUF> protocol, Consumer<SimpleProtocol<BUF, BASE>> consumer) Consumer version ofprotocol(NetworkProtocol)
. The Consumer will immediately be called with the created protocol. -
protocol
default <BUF extends FriendlyByteBuf,CTX, SimpleConnection<BASE> protocolNEWBASE extends SimplePacket<CTX>> (io.netty.util.AttributeKey<CTX> context, NetworkProtocol<BUF> protocol, Consumer<SimpleHandlerProtocol<BUF, NEWBASE>> consumer) Consumer version ofprotocol(AttributeKey,NetworkProtocol)
. The Consumer will immediately be called with the created protocol. -
configuration
Creates a builder grouping together packets that are only valid when under the Configuration protocol. This will validate that the protocol matches before the packet is sent or received. -
configuration
default <CTX,NEWBASE extends SimplePacket<CTX>> SimpleHandlerProtocol<FriendlyByteBuf,NEWBASE> configuration(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are only valid when under the Configuration protocol. This will validate that the protocol matches before the packet is sent or received. -
configuration
default SimpleConnection<BASE> configuration(Consumer<SimpleProtocol<FriendlyByteBuf, BASE>> consumer) Consumer version ofconfiguration()
. The Consumer will immediately be called with the created protocol. -
configuration
default <CTX,NEWBASE extends SimplePacket<CTX>> SimpleConnection<BASE> configuration(io.netty.util.AttributeKey<CTX> context, Consumer<SimpleHandlerProtocol<FriendlyByteBuf, NEWBASE>> consumer) Consumer version ofconfiguration(AttributeKey)
. The Consumer will immediately be called with the created protocol. -
login
Creates a builder grouping together packets that are only valid when under the Login protocol. This will validate that the protocol matches before the packet is sent or received. -
login
default <CTX,NEWBASE extends SimplePacket<CTX>> SimpleHandlerProtocol<FriendlyByteBuf,NEWBASE> login(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are only valid when under the Login protocol. This will validate that the protocol matches before the packet is sent or received. -
login
Consumer version oflogin()
. The Consumer will immediately be called with the created protocol. -
login
default <CTX,NEWBASE extends SimplePacket<CTX>> SimpleConnection<BASE> login(io.netty.util.AttributeKey<CTX> context, Consumer<SimpleHandlerProtocol<FriendlyByteBuf, NEWBASE>> consumer) Consumer version oflogin(AttributeKey)
. The Consumer will immediately be called with the created protocol. -
play
Creates a builder grouping together packets that are only valid when under the Play protocol. This will validate that the protocol matches before the packet is sent or received. -
play
default <CTX,NEWBASE extends SimplePacket<CTX>> SimpleHandlerProtocol<RegistryFriendlyByteBuf,NEWBASE> play(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are only valid when under the Login protocol. This will validate that the protocol matches before the packet is sent or received. -
play
default SimpleConnection<BASE> play(Consumer<SimpleProtocol<RegistryFriendlyByteBuf, BASE>> consumer) Consumer version ofplay()
. The Consumer will immediately be called with the created protocol. -
play
default <CTX,NEWBASE extends SimplePacket<CTX>> SimpleConnection<BASE> play(io.netty.util.AttributeKey<CTX> context, Consumer<SimpleHandlerProtocol<RegistryFriendlyByteBuf, NEWBASE>> consumer) Consumer version ofplay(AttributeKey)
. The Consumer will immediately be called with the created protocol. -
any
Creates a builder grouping together packets that are valid under any protocol. It is not recommended to do this, instead you should use one of the other methods in this class to make sure your packets have basic validation. -
any
default <CTX,NEWBASE extends SimplePacket<CTX>> SimpleHandlerProtocol<FriendlyByteBuf,NEWBASE> any(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are valid under any protocol. It is not recommended to do this, instead you should use one of the other methods in this class to make sure your packets have basic validation. -
any
Consumer version ofany()
. The Consumer will immediately be called with the created protocol. It is not recommended to do this, instead you should use one of the other methods in this class to make sure your packets have basic validation. -
any
default <CTX,NEWBASE extends SimplePacket<CTX>> SimpleConnection<BASE> any(io.netty.util.AttributeKey<CTX> context, Consumer<SimpleHandlerProtocol<FriendlyByteBuf, NEWBASE>> consumer) Consumer version ofany(AttributeKey)
. The Consumer will immediately be called with the created protocol. It is not recommended to do this, instead you should use one of the other methods in this class to make sure your packets have basic validation.
-