Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.pubnub.api;

Abstract class to be subclassed by objects being passed as callbacks to Pubnub APIs Default implementation for all methods is blank

Author(s):
Pubnub
 
public abstract class Callback {

    
This callback will be invoked when a message is received on the channel

Parameters:
channel Channel Name
message Message
    public void successCallback(String channelObject message) {
    	
    }
    
    
This callback will be invoked when a message is received on the channel

Parameters:
channel Channel Name
message Message
timetoken Timetoken
    public void successCallback(String channelObject messageString timetoken) {
    	
    }
    
    void successWrapperCallback(String channelObject messageString timetoken) {
    	successCallback(channelmessage);
    	successCallback(channelmessagetimetoken);
    }

    
This callback will be invoked when an error occurs

Parameters:
channel Channel Name
error error
    public void errorCallback(String channelPubnubError error) {
        errorCallback(channel,error.toString());
    }

    
This callback will be invoked when an error occurs

Deprecated:
as of version 3.5.2 and will be removed with 3.6.0 . Replaced by errorCallback(java.lang.String,com.pubnub.api.PubnubError)
Parameters:
channel Channel Name
message Message
    public void errorCallback(String channelObject message) {
    }

    
This callback will be invoked on getting connected to a channel

Parameters:
channel Channel Name
    public void connectCallback(String channelObject message) {
    }

    
This callback is invoked on getting reconnected to a channel after getting disconnected

Parameters:
channel Channel Name
    public void reconnectCallback(String channelObject message) {
    }

    
This callback is invoked on getting disconnected from a channel

Parameters:
channel Channel Name
    public void disconnectCallback(String channelObject message) {
    }
New to GrepCode? Check out our FAQ X