Methods and classes

JavaScript

To subscribe to and unsubscribe from a topic, the following JavaScript methods have been implemented in Intrexx 20.03:

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.

An example of JavaScript in conjunction with WebSockets is available here:

Example - Simple message

The API documentation is available at the following links:

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

Groovy

In order to create a WebSocket message and link it to a topic via a Groovy action, the following Groovy script class has been implemented in Intrexx 20.03:

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

You can send either text or JSON messages using the following functions, respectively:

GroovyWebSocketTopic.sendTextMessage
GroovyWebSocketTopic.sendJsonMessage

More information

An example of JavaScript in conjunction with WebSockets is available here:

Example - Simple message with Groovy script

The API documentation is available at the following links:

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