public class WebsocketClientEventsTramontana
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
boolean |
isOpen |
| Constructor and Description |
|---|
WebsocketClientEventsTramontana(Tramontana t,
java.lang.reflect.Method event) |
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CountDownLatch |
getLatch() |
void |
onConnect(Session session)
Handling establishment of the connection
|
void |
onError(java.lang.Throwable cause)
Handles errors occurring and writing them to the console
|
void |
onText(Session session,
java.lang.String message)
Sending incoming messages to the Processing sketch's websocket event function
|
void |
sendMessage(java.lang.String str)
Sends message to the websocket server
|
public WebsocketClientEventsTramontana(Tramontana t, java.lang.reflect.Method event)
public void onText(Session session,
java.lang.String message)
throws java.io.IOException
session - The connection between server and clientmessage - The received messagejava.io.IOException - If no event fonction is registered in the Processing sketch then an exception is thrown, but it will be ignoredpublic void onConnect(Session session)
session - The connection between server and clientpublic void sendMessage(java.lang.String str)
str - The message to send to the serverpublic void onError(java.lang.Throwable cause)
cause - The cause of an errorpublic java.util.concurrent.CountDownLatch getLatch()
Processing Library tramontana_processing by Pierluigi Dalla Rosa. pierdr(c) 2018