com.pusher.client.Client Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pusher-java-client Show documentation
Show all versions of pusher-java-client Show documentation
This is a Java client library for Pusher, targeted at core Java and Android.
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);
}