public class PresenceChannelImpl extends PrivateChannelImpl implements PresenceChannel
name, state, SUBSCRIPTION_SUCCESS_EVENT
Constructor and Description |
---|
PresenceChannelImpl(InternalConnection connection,
String channelName,
Authorizer authorizer,
Factory factory) |
Modifier and Type | Method and Description |
---|---|
void |
bind(String eventName,
SubscriptionEventListener listener)
Binds a
SubscriptionEventListener to an event. |
protected String[] |
getDisallowedNameExpressions() |
User |
getMe()
Gets the user that represents the currently connected client.
|
Set<User> |
getUsers()
Gets a set of users currently subscribed to the channel.
|
void |
onMessage(String event,
String message) |
String |
toString() |
String |
toSubscribeMessage() |
getAuthResponse, trigger
compareTo, getEventListener, getName, isSubscribed, setEventListener, toUnsubscribeMessage, unbind, updateState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
trigger
getName, isSubscribed, unbind
public PresenceChannelImpl(InternalConnection connection, String channelName, Authorizer authorizer, Factory factory)
public Set<User> getUsers()
PresenceChannel
getUsers
in interface PresenceChannel
public User getMe()
PresenceChannel
getMe
in interface PresenceChannel
public void onMessage(String event, String message)
onMessage
in interface InternalChannel
onMessage
in class ChannelImpl
public String toSubscribeMessage()
toSubscribeMessage
in interface InternalChannel
toSubscribeMessage
in class PrivateChannelImpl
public void bind(String eventName, SubscriptionEventListener listener)
Channel
SubscriptionEventListener
to an event. The
SubscriptionEventListener
will be notified whenever the specified
event is received on this channel.bind
in interface Channel
bind
in class PrivateChannelImpl
eventName
- The name of the event to listen to.listener
- A listener to receive notifications when the event is
received.protected String[] getDisallowedNameExpressions()
getDisallowedNameExpressions
in class PrivateChannelImpl
public String toString()
toString
in class PrivateChannelImpl
Copyright © 2017 Pusher. All rights reserved.