|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AtmosphereListener
Listens for events from an AtmosphereClient.
| Method Summary | |
|---|---|
void |
onAfterRefresh()
You will receive this after a connection has been refreshed or re-established and is ready to process new events. |
void |
onBeforeDisconnected()
Send just before the connection is stopped (this can happen also because the window is being closed) |
void |
onConnected(int heartbeat,
int connectionID)
The connection has been established |
void |
onDisconnected()
The connection has disconnected. |
void |
onError(Throwable exception,
boolean connected)
An error has occurred. |
void |
onHeartbeat()
The connection has received a heartbeat. |
void |
onMessage(List<?> messages)
A batch of messages from the server has arrived. |
void |
onRefresh()
The connection will be refreshed by the client. |
| Method Detail |
|---|
void onConnected(int heartbeat,
int connectionID)
heartbeat - This is the interval with which the server will send heartbeatsconnectionID - This is the unique number that identifies this connectionvoid onBeforeDisconnected()
void onDisconnected()
AtmosphereClient.isRunning() == true)
the connecting will be refreshed after this and you can expect the next event to be onAfterRefresh()
void onError(Throwable exception,
boolean connected)
exception - connected - This will indicate whether the connection is still alivevoid onHeartbeat()
void onRefresh()
void onAfterRefresh()
void onMessage(List<?> messages)
messages -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||