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

com.pubnub.api.java.callbacks.PNCallback Maven / Gradle / Ivy

package com.pubnub.api.java.callbacks;

import com.pubnub.api.PubNubException;
import com.pubnub.api.v2.callbacks.Result;
import org.jetbrains.annotations.Nullable;

import java.util.function.Consumer;

public interface PNCallback extends Consumer> {
    void onResponse(@Nullable X result, @Nullable PubNubException exception);

    @Override
    default void accept(Result xResult) {
        onResponse(xResult.getOrNull(), xResult.exceptionOrNull());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy