Interface P2PService.DisconnectionListener

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.DisconnectionListener
Consumer of network disconnection events.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onDisconnect(PeerConnection connection, org.apache.tuweni.bytes.Bytes disconnectionCode, String disconnectionMessage, boolean initiatedByPeer)
    Called when a peer connection is terminated.
  • Method Details

    • onDisconnect

      void onDisconnect(PeerConnection connection, org.apache.tuweni.bytes.Bytes disconnectionCode, String disconnectionMessage, boolean initiatedByPeer)
      Called when a peer connection is terminated.
      Parameters:
      connection - the connection that was closed
      disconnectionCode - the code indicating the reason for disconnection
      disconnectionMessage - a human-readable message explaining the disconnection reason
      initiatedByPeer - true if the remote peer initiated the disconnect