001package com.pusher.client;
002
003import com.pusher.client.channel.Channel;
004import com.pusher.client.channel.ChannelEventListener;
005import com.pusher.client.channel.PresenceChannel;
006import com.pusher.client.channel.PresenceChannelEventListener;
007import com.pusher.client.channel.PrivateChannel;
008import com.pusher.client.channel.PrivateChannelEventListener;
009import com.pusher.client.connection.Connection;
010import com.pusher.client.connection.ConnectionEventListener;
011import com.pusher.client.connection.ConnectionState;
012
013public interface Client {
014    Connection getConnection();
015
016    void connect();
017
018    void connect(final ConnectionEventListener eventListener, ConnectionState... connectionStates);
019
020    void disconnect();
021
022    Channel subscribe(final String channelName);
023
024    Channel subscribe(final String channelName, final ChannelEventListener listener, final String... eventNames);
025
026    PrivateChannel subscribePrivate(final String channelName);
027
028    PrivateChannel subscribePrivate(
029            final String channelName,
030            final PrivateChannelEventListener listener,
031            final String... eventNames
032    );
033
034    PresenceChannel subscribePresence(final String channelName);
035
036    PresenceChannel subscribePresence(
037            final String channelName,
038            final PresenceChannelEventListener listener,
039            final String... eventNames
040    );
041
042    void unsubscribe(final String channelName);
043
044    Channel getChannel(String channelName);
045
046    PrivateChannel getPrivateChannel(String channelName);
047
048    PresenceChannel getPresenceChannel(String channelName);
049}