com.pusher.client.channel.impl
Class PrivateChannelImpl
java.lang.Object
com.pusher.client.channel.impl.ChannelImpl
com.pusher.client.channel.impl.PrivateChannelImpl
- All Implemented Interfaces:
- Channel, InternalChannel, PrivateChannel, Comparable<InternalChannel>
- Direct Known Subclasses:
- PresenceChannelImpl
public class PrivateChannelImpl
- extends ChannelImpl
- implements PrivateChannel
PrivateChannelImpl
public PrivateChannelImpl(InternalConnection connection,
String channelName,
Authorizer authorizer)
trigger
public void trigger(String eventName,
String data)
- Description copied from interface:
PrivateChannel
- 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.
There are a number of restrictions enforced with client events. For full details see the client events documentation.
- Specified by:
trigger
in interface PrivateChannel
- Parameters:
eventName
- The name of the event to trigger. It must have a client-
prefix.data
- The data to be triggered with the event.
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 ChannelImpl
- Parameters:
eventName
- The name of the event to listen to.listener
- A listener to receive notifications when the event is received.
toSubscribeMessage
public String toSubscribeMessage()
- Specified by:
toSubscribeMessage
in interface InternalChannel
- Overrides:
toSubscribeMessage
in class ChannelImpl
getDisallowedNameExpressions
protected String[] getDisallowedNameExpressions()
- Overrides:
getDisallowedNameExpressions
in class ChannelImpl
getAuthResponse
protected String getAuthResponse()
- Protected access because this is also used by PresenceChannelImpl.
toString
public String toString()
- Overrides:
toString
in class ChannelImpl
Copyright © 2013 Pusher. All Rights Reserved.