com.pusher.client.channel.impl
Class PresenceChannelImpl
java.lang.Object
com.pusher.client.channel.impl.ChannelImpl
com.pusher.client.channel.impl.PrivateChannelImpl
com.pusher.client.channel.impl.PresenceChannelImpl
- All Implemented Interfaces:
- Channel, InternalChannel, PresenceChannel, PrivateChannel, Comparable<InternalChannel>
public class PresenceChannelImpl
- extends PrivateChannelImpl
- implements PresenceChannel
PresenceChannelImpl
public PresenceChannelImpl(InternalConnection connection,
String channelName,
Authorizer authorizer)
getUsers
public Set<User> getUsers()
- Description copied from interface:
PresenceChannel
- Gets a set of users currently subscribed to the channel.
- Specified by:
getUsers
in interface PresenceChannel
- Returns:
- The users.
getMe
public User getMe()
- Description copied from interface:
PresenceChannel
- Gets the user that represents the currently connected client.
- Specified by:
getMe
in interface PresenceChannel
- Returns:
- A user.
onMessage
public void onMessage(String event,
String message)
- Specified by:
onMessage
in interface InternalChannel
- Overrides:
onMessage
in class ChannelImpl
toSubscribeMessage
public String toSubscribeMessage()
- Specified by:
toSubscribeMessage
in interface InternalChannel
- Overrides:
toSubscribeMessage
in class PrivateChannelImpl
bind
public void bind(String eventName,
SubscriptionEventListener listener)
- Description copied from interface:
Channel
- Binds a
SubscriptionEventListener
to an event. The SubscriptionEventListener
will be notified whenever the
specified event is received on this channel.
- Specified by:
bind
in interface Channel
- Overrides:
bind
in class PrivateChannelImpl
- Parameters:
eventName
- The name of the event to listen to.listener
- A listener to receive notifications when the event is received.
getDisallowedNameExpressions
protected String[] getDisallowedNameExpressions()
- Overrides:
getDisallowedNameExpressions
in class PrivateChannelImpl
toString
public String toString()
- Overrides:
toString
in class PrivateChannelImpl
Copyright © 2013 Pusher. All Rights Reserved.