![JAR search and dependency download from the Maven repository](/logo.png)
com.pusher.client.connection.Connection.html Maven / Gradle / Ivy
Connection (Pusher Java Websocket API)
com.pusher.client.connection
Interface Connection
-
public interface Connection
Represents a connection to Pusher.
-
-
Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type
Method and Description
void
bind(ConnectionState state,
ConnectionEventListener eventListener)
Bind to connection events.
void
connect()
No need to call this via the API.
java.lang.String
getSocketId()
Gets a unique connection ID.
ConnectionState
getState()
Gets the current connection state.
boolean
unbind(ConnectionState state,
ConnectionEventListener eventListener)
Unbind from connection state changes.
-
-
Method Detail
-
connect
void connect()
No need to call this via the API. Instead use Pusher.connect()
.
-
bind
void bind(ConnectionState state,
ConnectionEventListener eventListener)
Bind to connection events.
- Parameters:
state
- The states to bind to.
eventListener
- A listener to be called when the state changes.
-
unbind
boolean unbind(ConnectionState state,
ConnectionEventListener eventListener)
Unbind from connection state changes.
- Parameters:
state
- The state to unbind from.
eventListener
- The listener to be unbound.
- Returns:
true
if the unbind was successful, otherwise
false
.
-
getState
ConnectionState getState()
Gets the current connection state.
- Returns:
- The state.
-
getSocketId
java.lang.String getSocketId()
Gets a unique connection ID.
- Returns:
- The id.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy