Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.pubnub.api
Class Callback

    java.lang.Object
      com.pubnub.api.Callback

    public abstract class Callback

extends java.lang.Object

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

Author:
  Pubnub

Constructor Summary
`Callback()`

Method Summary
`void` | `connectCallback(java.lang.String channel, java.lang.Object message)` This callback will be invoked on getting connected to a channel
`void` | `disconnectCallback(java.lang.String channel, java.lang.Object message)` This callback is invoked on getting disconnected from a channel
`abstract void` | `errorCallback(java.lang.String channel, java.lang.Object message)` This callback will be invoked when an error occurs
`void` | `reconnectCallback(java.lang.String channel, java.lang.Object message)` This callback is invoked on getting reconnected to a channel after getting disconnected
`abstract void` | `successCallback(java.lang.String channel, java.lang.Object message)` This callback will be invoked when a message is received on the channel

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Callback

    public Callback()

Method Detail

### successCallback

    public abstract void successCallback(java.lang.String channel,
                                         java.lang.Object message)

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

  Parameters:
    `channel` - Channel Name
    `message` - Message

### errorCallback

    public abstract void errorCallback(java.lang.String channel,
                                       java.lang.Object message)

  This callback will be invoked when an error occurs

  Parameters:
    `channel` - Channel Name
    `message` - Message

### connectCallback

    public void connectCallback(java.lang.String channel,
                                java.lang.Object message)

  This callback will be invoked on getting connected to a channel

  Parameters:
    `channel` - Channel Name

### reconnectCallback

    public void reconnectCallback(java.lang.String channel,
                                  java.lang.Object message)

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

  Parameters:
    `channel` - Channel Name

### disconnectCallback

    public void disconnectCallback(java.lang.String channel,
                                   java.lang.Object message)

  This callback is invoked on getting disconnected from a channel

  Parameters:
    `channel` - Channel Name

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD