Interface BaseProtocol<FLOW,PROTOCOL extends BaseProtocol<FLOW,PROTOCOL>>
- All Known Subinterfaces:
PayloadFlow<BUF,
,BASE> PayloadHandlerFlow<BUF,
,BASE> PayloadHandlerProtocol<BUF,
,BASE> PayloadProtocol<BUF,
,BASE> SimpleFlow<BUF,
,BASE> SimpleHandlerFlow<BUF,
,BASE> SimpleHandlerProtocol<BUF,
,BASE> SimpleProtocol<BUF,
BASE>
- All Known Implementing Classes:
PayloadChannel.Builder.Flow
,PayloadChannel.Builder.HandlerFlow
,PayloadChannel.Builder.HandlerProtocol
,PayloadChannel.Builder.Protocol
,SimpleChannel.Flow
,SimpleChannel.HandlerFlow
,SimpleChannel.HandlerProtocol
,SimpleChannel.Protocol
public interface BaseProtocol<FLOW,PROTOCOL extends BaseProtocol<FLOW,PROTOCOL>>
-
Method Summary
Modifier and TypeMethodDescriptiondefault FLOW
Creates a builder that validates both current protocol, and that packets are send from either flowdefault PROTOCOL
bidirectional
(Consumer<FLOW> consumer) Consumer version ofbidirectional()
.default FLOW
Creates a builder that validates both current protocol, and that packets are send from Server to Clientdefault PROTOCOL
clientbound
(Consumer<FLOW> consumer) Consumer version ofclientbound()
.default PROTOCOL
An alias forbidirectional(Consumer)
.flow
(@Nullable PacketFlow flow) default PROTOCOL
flow
(@Nullable PacketFlow flow, Consumer<FLOW> consumer) Consumer version offlow(PacketFlow)
.default FLOW
Creates a builder that validates both current protocol, and that packets are send from Client to Serverdefault PROTOCOL
serverbound
(Consumer<FLOW> consumer) Consumer version ofserverbound()
.
-
Method Details
-
flow
-
flow
Consumer version offlow(PacketFlow)
. The Consumer will immediately be called with the created protocol. -
clientbound
Creates a builder that validates both current protocol, and that packets are send from Server to Client -
clientbound
Consumer version ofclientbound()
. The Consumer will immediately be called with the created flow. -
serverbound
Creates a builder that validates both current protocol, and that packets are send from Client to Server -
serverbound
Consumer version ofserverbound()
. The Consumer will immediately be called with the created flow. -
bidirectional
Creates a builder that validates both current protocol, and that packets are send from either flow -
bidirectional
Consumer version ofbidirectional()
. The Consumer will immediately be called with the created flow. -
flow
An alias forbidirectional(Consumer)
. The Consumer will immediately be called with the created flow.
-