handle

abstract fun handle(pnMessageResult: PNMessageResult)

This interface is designed for implementing custom handlers that respond to message retrieval operations. It defines a single handle method that is called with a PNMessageResult instance, which contains the message.

Usage example:


OnMessageHandler handler = pnMessageResult -> {
    System.out.println("Received message: " + pnMessageResult.getMessage());
};

See also

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