TIBCO Spotfire® Statistics Services Users Guide

Use notifications

When the client instance is first instantiated (using the ClientFactory.getserviceClient() methods, where service is the type of service), a listening port is opened on the client to receive messages from Spotfire Statistics Services. When any change to the job status (such as job completion, failure, or interruption) occurs, the server sends a message to the client, which can opt to handle the message as appropriate.

You can get or set the notification type property in the ClientFactory to either Polling or UDP. By default, it is set to UdpCallback.

Note: As of Apache Tomcat version 8.5, Comet notification is no longer supported; therefore, it is no longer included in the Spotfire Statistics Services Java and C# API.

Notification is supported only in the C# and Java APIs. It is not available in the URL API.

For the UDP protocol on the server, the port is assigned randomly by default. However, it is likely that your server administrator has designated a port or a range of ports specifically for the UDP protocol. You can specify a port using the ClassFactory.NotificationReceiverPort property. Check with your server administrator to get more information about your notification protocol, and to learn which ports to use in your client.

User Datagram Protocol (UDP) is a connectionless communication protocol used frequently by services and other special-use applications. Some network routers and switches are configured to either limit UDP traffic or block it entirely. As such, it is usually only reliable in a local area network (LAN) environment where the clients reside on the same subnet as the server. If you are having trouble using the notification features described in this section, consult your Network Administrator to determine whether UDP communication is fully supported on your network.

We strongly recommend against using GetJobs() to poll the server to see if the status of any of your asynchronously-run jobs has changed. This practice is resource-intensive. Rather, we recommend that you use the notification APIs provided for C# or Java.