The classic client API will be removed in a future release.
@Deprecated public interface ServerConnectionListener
ServerConnection
.
When such a listener is used for more than one connection then it is important that any processing within the implemented methods is thread safe as a method could be called from more than one thread at the same time. The easiest way to achieve this would be simply to synchronize the methods themselves.
Note that it is important that any object that is a listener has equals() methods such that all listener objects are unique.
Modifier and Type | Method and Description |
---|---|
void |
messageFromServer(ServerConnection serverConnection,
TopicMessage message)
Deprecated.
Notification of a message from the Server.
|
void |
serverConnected(ServerConnection serverConnection)
Deprecated.
Notification of Connection.
|
void |
serverDisconnected(ServerConnection serverConnection)
Deprecated.
Notification of disconnection.
|
void |
serverRejectedCredentials(ServerConnection serverConnection,
Credentials credentials)
Deprecated.
This is called when Credentials have been sent to the Server (using
ServerConnection.sendCredentials(Credentials) ) but
the Server has rejected the credentials. |
void |
serverTopicStatusChanged(ServerConnection serverConnection,
String topicName,
TopicStatus status)
Deprecated.
Notification that the status of a Topic that was subscribed to has
changed.
|
void serverConnected(ServerConnection serverConnection)
This is called when a Server connection is made.
serverConnection
- the Server connection.void messageFromServer(ServerConnection serverConnection, TopicMessage message)
serverConnection
- the Server connection.message
- the message which can be a topic load message or
a delta message.void serverTopicStatusChanged(ServerConnection serverConnection, String topicName, TopicStatus status)
serverConnection
- the Server connection.topicName
- the name of the topic that has had a status change.status
- the new Topic status.void serverRejectedCredentials(ServerConnection serverConnection, Credentials credentials)
ServerConnection.sendCredentials(Credentials)
) but
the Server has rejected the credentials.
serverConnection
- the Server connection.credentials
- the credentials that were rejected.void serverDisconnected(ServerConnection serverConnection)
The reason for the disconnection can be established by checking the
state of the connection using ServerConnection.getState()
serverConnection
- the server connection.Copyright © 2016 Push Technology Ltd. All Rights Reserved.