Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions src/main/java/com/pusher/client/Client.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.pusher.client;

import com.pusher.client.channel.Channel;
import com.pusher.client.channel.ChannelEventListener;
import com.pusher.client.channel.PresenceChannel;
import com.pusher.client.channel.PresenceChannelEventListener;
import com.pusher.client.channel.PrivateChannel;
import com.pusher.client.channel.PrivateChannelEventListener;
import com.pusher.client.connection.Connection;
import com.pusher.client.connection.ConnectionEventListener;
import com.pusher.client.connection.ConnectionState;

/**
* Created by jamiepatel on 09/06/2016.
*/
public interface Client {
Connection getConnection();
void connect();
void connect(final ConnectionEventListener eventListener, ConnectionState... connectionStates);
void disconnect();
Channel subscribe(final String channelName);
Channel subscribe(final String channelName, final ChannelEventListener listener, final String... eventNames);
PrivateChannel subscribePrivate(final String channelName);
PrivateChannel subscribePrivate(final String channelName, final PrivateChannelEventListener listener,
final String... eventNames);
PresenceChannel subscribePresence(final String channelName);
PresenceChannel subscribePresence(final String channelName, final PresenceChannelEventListener listener,
final String... eventNames);
void unsubscribe(final String channelName);
Channel getChannel(String channelName);
PrivateChannel getPrivateChannel(String channelName);
PresenceChannel getPresenceChannel(String channelName);
}
2 changes: 1 addition & 1 deletion src/main/java/com/pusher/client/Pusher.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* {@link Pusher#subscribePresence(String)} or one of the overloads.
* </p>
*/
public class Pusher {
public class Pusher implements Client {

private final PusherOptions pusherOptions;
private final InternalConnection connection;
Expand Down