Interface P2PService.MessageListener

Enclosing interface:
P2PService
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 static interface P2PService.MessageListener
Consumer of network message events.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onMessage(Capability capability, Message message)
    Called for each incoming message on a subscribed capability.
  • Method Details

    • onMessage

      void onMessage(Capability capability, Message message)
      Called for each incoming message on a subscribed capability.
      Parameters:
      capability - the capability of the message
      message - the message