UTIMER

UTIMER is an internal Uniface component that sets a timer that can post messages to a specified component instance as a notification that a specified time period has elapsed. It can be used, for example, to check status or to poll a database at regular intervals.

The UTIMER can run in an exclusive server but it can only post messages to applications that are registered with the Uniface Router. It cannot send postmessages to local components in that exclusive server. This differs from normal postmessage behavior.

Normally, a postmessage that is sent in an exclusive server to another component in the same exclusive server gets converted to a send message. However, when the UTIMER runs in a Uniface Server, it actually runs in a separate thread from the main userver process thread. The message is therefore directed to the Uniface Router, which cannot deliver the message because exclusive servers do not register with the Uniface Router.

Using the UTIMER

For the UTIMER to generate any timer messages, you must do the following:

  1. Specify the message to be sent. There is no default timer message, so you must do this explicitly using the setMessage() operation.

  2. Start the timer by activating the start() operation.

  3. Optionally, specify how often the timer message should be sent using the setRepeat() operation. By default, it is sent only once.

Operations

For descriptions of the operations, see the sub-topics.

Related Topics