Module org.refcodes.p2p
Package org.refcodes.p2p
Interface P2PMessageConsumer<MSG extends P2PMessage<?,?,?,?>,PEER extends Peer<?,?,?,MSG,?>>
- Type Parameters:
MSG
- The (sub-)type of theP2PMessage
being processed by the accordingPeer
(sub-)type.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface P2PMessageConsumer<MSG extends P2PMessage<?,?,?,?>,PEER extends Peer<?,?,?,MSG,?>>
A message consumer is a functional interfaces consuming messages.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onP2PMessage
(MSG aMessage, PEER aPeer) Invoked when a message is being consumed.
-
Method Details
-
onP2PMessage
Invoked when a message is being consumed.- Parameters:
aMessage
- The message to be consumed.aPeer
- ThePeer
notifying upon the message.
-