Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » MobiLink - Server-Initiated Synchronization » Server-initiated synchronization setup » Listeners » Message handlers

 

Message filters

When a push notification is received by a MobiLink Listener, it extracts a message, which is split up and divided into several keywords. The message keyword contains the entire message in a raw format. The message is then divided into subject, content, and sender keywords. These keywords are run through your message filter to determine which actions to initiate. For more information about using these keywords for filtering messages, see MobiLink Listener keywords for Windows devices.

A filter keyword is used to compare part of a push notification to a user-defined phrase. If the two phrases are textually equivalent, then an action is initiated. For more information about preprocessing push notifications for message filtering, see Message syntax.

Filter keywords can be specified by running the MobiLink Listener with the following syntax:

dblsn ... -l "filter-keyword-name='content to filter';action='...'"

You can use the -l option multiple times to create multiple filters, but you must also specify an action for every -l instance. Actions are only initiated when all filters are satisfied.

Each of the following keywords can only appear once in a message handler:

  • content   This and the subject keyword are recommended for filtering messages. Use this keyword to filter messages based on their content. For example:
    dblsn -l "content='your content filter here';action='...'"

  • subject   This and the content keyword are recommended for filtering messages. Use this keyword to filter messages based on their subject. For example:
    dblsn -l "subject='your subject filter here';action='...'"

  • message   Use this keyword to filter messages based on their raw data. Your filter value must match the exact length of the message. This keyword is not recommended since it has a variable structure. For more information about preprocessing push notifications for message filtering, see Message syntax.

  • message_start   Use this keyword to filter messages based on part of their raw data, starting from the beginning. For more information about preprocessing push notifications for message filtering, see Message syntax.

    When you specify this keyword, the MobiLink Listener creates the $message_start and $message_end action variables.

  • sender   Use this keyword to filter messages based on their sender. This keyword is useful for tracking push notifications sent by a particular Notifier. The value is dependent on the gateway being used. For UDP gateways, it is the IP address of the host of the gateway. For SYNC gateways, it is MobiLink. For SMTP gateways, it depends on your wireless carrier. See Gateways and carriers.

 See also

Initiation of actions
Action variables
Light weight polling option setup