com.pusher.client.channel.impl
Class PrivateChannelImpl

java.lang.Object
  extended by com.pusher.client.channel.impl.ChannelImpl
      extended by 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


Field Summary
 
Fields inherited from class com.pusher.client.channel.impl.ChannelImpl
eventNameToListenerMap, name, state, SUBSCRIPTION_SUCCESS_EVENT
 
Constructor Summary
PrivateChannelImpl(InternalConnection connection, String channelName, Authorizer authorizer)
           
 
Method Summary
 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.
 
Methods inherited from class com.pusher.client.channel.impl.ChannelImpl
compareTo, getEventListener, getName, onMessage, setEventListener, toUnsubscribeMessage, unbind, updateState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.pusher.client.channel.Channel
getName, unbind
 

Constructor Detail

PrivateChannelImpl

public PrivateChannelImpl(InternalConnection connection,
                          String channelName,
                          Authorizer authorizer)
Method Detail

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.