All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pubnub.api.java.v2.callbacks.handlers.OnMessageHandler Maven / Gradle / Ivy

package com.pubnub.api.java.v2.callbacks.handlers;


import com.pubnub.api.models.consumer.pubsub.PNMessageResult;

@FunctionalInterface
public interface OnMessageHandler {
    /**
     * 

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

*

* Usage example: *

*
     * {@code
     * OnMessageHandler handler = pnMessageResult -> {
     *     System.out.println("Received message: " + pnMessageResult.getMessage());
     * };
     * }
     * 
* * @see PNMessageResult for more information about the message result provided to this handler. */ void handle(PNMessageResult pnMessageResult); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy