|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SubscriptionEventListener
Client applications should implement this interface if they want to be notified when events are received on a public or private channel.
To bind your implementation of this interface to a channel, either:
Pusher.subscribe(String) to subscribe and receive an instance of Channel.Channel#bind(String, ChannelEventListener) to bind your listener to a specified event.Pusher.subscribe(String, ChannelEventListener, String...) to subscribe to a channel and
bind your listener to one or more events at the same time.
| Method Summary | |
|---|---|
void |
onEvent(String channelName,
String eventName,
String data)
Callback that is fired whenever an event that this SubscriptionEventListener has been bound to is received. |
| Method Detail |
|---|
void onEvent(String channelName,
String eventName,
String data)
channelName - The name of the channel that the event has been received on. This is useful if your ChannelEventListener
has been bound to events on more than one channel.eventName - The name of the event that has been received. This will always be one of the events that your ChannelEventListener
has been bound to.data - The JSON data that was included with the event. This can be parsed with Google's Gson library, which is a
dependency of this library, or your library of choice.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||