Package com.pusher.client.channel
Interface ChannelEventListener
-
- All Superinterfaces:
SubscriptionEventListener
- All Known Subinterfaces:
PresenceChannelEventListener,PrivateChannelEventListener,PrivateEncryptedChannelEventListener
public interface ChannelEventListener extends 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:
- Call
Pusher.subscribe(String)to subscribe and receive an instance ofChannel. - Call
Channel.bind(String, SubscriptionEventListener)to bind your listener to a specified event.
Or, call
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonSubscriptionSucceeded(java.lang.String channelName)Callback that is fired when a subscription success acknowledgement message is received from Pusher after subscribing to the channel.-
Methods inherited from interface com.pusher.client.channel.SubscriptionEventListener
onError, onEvent
-
-
-
-
Method Detail
-
onSubscriptionSucceeded
void onSubscriptionSucceeded(java.lang.String channelName)
Callback that is fired when a subscription success acknowledgement message is received from Pusher after subscribing to the channel.
For public channels this callback will be more or less immediate, assuming that you are connected to Pusher at the time of subscription. For private channels this callback will not be fired unless you are successfully authenticated.
- Parameters:
channelName- The name of the channel that was successfully subscribed.
-
-