handle

abstract fun handle(pnMembershipResult: PNMembershipResult)

This interface is designed for implementing custom handlers that respond to membershipMetadata event retrieval operations. It defines a single handle method that is called with a PNMembershipResult instance, which contains the membership metadata.

Usage example:


OnMembershipHandler handler = pnMembershipResult -> {
    System.out.println("Received membership event: " + pnMembershipResult.getEvent());
};

See also

for more information about the message result provided to this handler.