The Listener runs on remote devices. It receives messages from the Notifier and processes them into actions based on message handlers that you create. A typical message handler contains filters, actions, and options.
For example, for the following Listener command line, the Listener starts dbmlsync if it receives a message with the subject FullSync:
dblsn -l "subject='FullSync';action='run dbmlsync.exe ...'"
Following are some of the actions that you can invoke. Typically, the action you choose is synchronization initiated via either dbmlsync or an UltraLite application.
Actions can be parameterized with variables derived from the message. This provides extra flexibility in implementing dynamic options.
Normally, you only need to start up one Listener on a device. One Listener can listen on multiple channels and it can serve multiple MobiLink users on the same device. A running Listener always listens on UDP (except for Palm Listeners).
Listeners can also synchronize device tracking information back to the consolidated database. For more information, see Device tracking.
The following command starts the Listener utility. It must be typed on one line.
dblsn -v2 -m -ot dblsn.log -x "host=localhost" -l "subject=sync;action='start dbmlsync.exe -c eng=rem1;uid=DBA;pwd=sql -ot dbmlsyncOut.txt -k';"
The options used in this example are:
|-v2||Set verbosity to level 2 (log Listener DLL messages and action tracing).|
|-m||Log notification messages.|
|-ot||Truncate the log file and send output to it. In this case, the output file is dblsn.log.|
|-x||Specify a way to connect to the MobiLink server. This is required for device tracking and delivery confirmation. In this simple example, the only protocol options that are specified are "host=localhost". For a complete list of protocol options, see -x option.|
|-l||Specify a message handler. In this case the filter is that a message must contain the subject sync, and the action is to start dbmlsync. Three dbmlsync command line options are also provided: -c specifies a connection string to the MobiLink server for the synchronization; -ot names an output log file; and -k shuts down dbmlsync when the synchronization is complete.|
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|