Methods and Classes

JavaScript

The following JavaScript methods have been implemented in Intrexx 20.03 for subscribing to and unsubscribing from a topic:

ix.websocket.subscribeToTopic
ix.websocket.unsubscribeFromTopic

The "ix.websocket.subscribeToTopic" method is used to subscribe to a topic. The "ix.websocket.unsubscribeFromTopic" method is used to unsubscribe from a topic.

You can also find detailed information about JavaScript in the context of WebSockets in the following section:

Example - Simple Message

You can find the API documentation at the following link:

https://docs.intrexx.com/intrexx/version/11000/steady/api/js/html/modules/IxWebsocket.html

Starting with Intrexx version 12.0.0

https://docs.intrexx.com/intrexx/version/steady/api/js/html/modules/api.websocket.html

Groovy

To enable a Groovy action to send a WebSocket message and establish a connection to a topic, the following Groovy script class was implemented in Intrexx 20.03:

de.uplanet.lucy.server.websocket.groovy.GroovyWebSocketTopic

You can use the following functions to send either text or JSON messages:

GroovyWebSocketTopic.sendTextMessage
GroovyWebSocketTopic.sendJsonMessage

More Information

You can also find detailed information about GroovyScript in connection with WebSockets in the following section:

Example - Simple Message with GroovyScript

You can find the API documentation at the following link:

https://docs.intrexx.com/intrexx/version/steady/api/groovy/jdk/de/uplanet/lucy/server/websocket/groovy/GroovyWebSocketTopic.html