
com.pusher.client.connection.Connection 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.connection;
/**
* Represents a connection to Pusher.
*
*/
public interface Connection {
/**
* No need to call this via the API. Instead use {@link com.pusher.client.Pusher#connect}.
*/
void connect();
/**
* Bind to connection events.
*
* @param state
* The states to bind to.
* @param eventListener
* A listener to be called when the state changes.
*/
void bind(ConnectionState state, ConnectionEventListener eventListener);
/**
* Unbind from connection state changes.
*
* @param state
* The state to unbind from.
* @param eventListener
* The listener to be unbound.
* @return true
if the unbind was successful, otherwise
* false
.
*/
boolean unbind(ConnectionState state, ConnectionEventListener eventListener);
/**
* Gets the current connection state.
*
* @return The state.
*/
ConnectionState getState();
/**
* Gets a unique connection ID.
*
* @return The id.
*/
String getSocketId();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy