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

  • 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 Detail

      • 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.