Interface P2PMessageConsumer<MSG extends P2PMessage<?,?,?,?>,PEER extends Peer<?,?,?,MSG,?>>

Type Parameters:
MSG - The (sub-)type of the P2PMessage being processed by the according Peer (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 Type
    Method
    Description
    void
    onP2PMessage(MSG aMessage, PEER aPeer)
    Invoked when a message is being consumed.
  • Method Details

    • onP2PMessage

      void onP2PMessage(MSG aMessage, PEER aPeer)
      Invoked when a message is being consumed.
      Parameters:
      aMessage - The message to be consumed.
      aPeer - The Peer notifying upon the message.