public class PrivateChannelImpl extends ChannelImpl implements PrivateChannel
name, state, SUBSCRIPTION_SUCCESS_EVENT
Constructor and Description |
---|
PrivateChannelImpl(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 |
getAuthResponse()
Protected access because this is also used by PresenceChannelImpl.
|
protected String[] |
getDisallowedNameExpressions() |
String |
toString() |
String |
toSubscribeMessage() |
void |
trigger(String eventName,
String data)
Once subscribed it is possible to trigger client events on a private
channel as long as client events have been activated for the a Pusher
application.
|
compareTo, getEventListener, getName, isSubscribed, onMessage, setEventListener, toUnsubscribeMessage, unbind, updateState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName, isSubscribed, unbind
public PrivateChannelImpl(InternalConnection connection, String channelName, Authorizer authorizer, Factory factory)
public void trigger(String eventName, String data)
PrivateChannel
trigger
in interface PrivateChannel
eventName
- The name of the event to trigger. It must have a
client-
prefix.data
- The data to be triggered with the event.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 ChannelImpl
eventName
- The name of the event to listen to.listener
- A listener to receive notifications when the event is
received.public String toSubscribeMessage()
toSubscribeMessage
in interface InternalChannel
toSubscribeMessage
in class ChannelImpl
protected String[] getDisallowedNameExpressions()
getDisallowedNameExpressions
in class ChannelImpl
protected String getAuthResponse()
public String toString()
toString
in class ChannelImpl
Copyright © 2018 Pusher. All rights reserved.