|
void | onOpen (@PathParam("userId") String userId, @PathParam("username") String username, Session session) |
|
void | onClose (Session session) |
|
void | onMessage (String message, Session session) |
|
void | onError (Throwable error) |
|
Websocket server on server endpoint /websocket/{userId}/{username}
◆ onClose()
void websocket.Websocket.onClose |
( |
Session |
session | ) |
|
|
inline |
Method called when client disconnects from websocket. Removes clients session.
- Parameters
-
session | information about clients session |
◆ onError()
void websocket.Websocket.onError |
( |
Throwable |
error | ) |
|
|
inline |
Method used on error
- Parameters
-
error | contains information about error |
◆ onMessage()
void websocket.Websocket.onMessage |
( |
String |
message, |
|
|
Session |
session |
|
) |
| |
|
inline |
Method used when server receives message from client which is sent to specified user.
- Parameters
-
message | message received from client |
session | information about clients session |
◆ onOpen()
void websocket.Websocket.onOpen |
( |
@PathParam("userId") String |
userId, |
|
|
@PathParam("username") String |
username, |
|
|
Session |
session |
|
) |
| |
|
inline |
Method called when client wants to establish connection with websocket
- Parameters
-
userId | added to session properties to link each session to a specific user |
username | added to session properties to link each session to a specific user |
session | information about clients session |
The documentation for this class was generated from the following file:
- src/main/java/websocket/Websocket.java