Example of xml property file

Updated 2011-11-02
The app home folder i ${user.home}\${app.home} (${app.home} = .traymonitor) and the name of the property file is "settings.xml" - but I you compile youself simple change the pom.xml setting. To add your user name to e.g. log files simply use ${user.name}. Below is a working example of a property file.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<traymonitorProperties xmlns="http://www.sunlock.dk/traymonitor/schemas">
  <system>
    <proxy>
      <host>my.proxy.host</host>
      <port>8080</port>
    </proxy>
  </system>
  <menus>
    <menu name="Server one">
      <entries>
        <entry>
          <name>Open log file</name>
          <url>${user.home}/${app.home}/mylog.log</url>
          <type>edit</type>
        </entry>
        <entry>
          <type>SEPARATOR</type>
        </entry>
        <entry>
          <name>console</name>
          <url>http://localhost/console/</url>
          <type>page</type>
        </entry>
      </entries>
    </menu>
    <menu name="Server two">
      <entries>
        <entry>
          <name>localhost</name>
          <url>http://localhost</url>
          <type>page</type>
        </entry>
      </entries>
    </menu>
  </menus>
  <monitors>
    <monitor name="localhost">
      <monitorUrl>http://localhost</monitorUrl>
      <initWait>1</initWait>
      <delayBetweenRuns>300</delayBetweenRuns>
      <useProxy>true</useProxy>
      <logFile>${user.home}/${app.home}/mylog.log</logFile>
      <threshold>1000</threshold>
      <parameters>
        <parameter>
          <key>Proxy-Remote-User</key>
          <value>${user.name}</value>
        </parameter>
      </parameters>
    </monitor>
    <monitor name="some-other-domain">
      <monitorUrl>http://some-other-domain</monitorUrl>
      <initWait>1</initWait>
      <delayBetweenRuns>300</delayBetweenRuns>
      <useProxy>true</useProxy>
      <logFile>${user.home}/${app.home}/mylog.log</logFile>
    </monitor>
  </monitors>
</traymonitorProperties>

Parameters


Proxy: The proxy settings are defined using host (for host url) and port (for port of proxy).

Menus: The menu is defined by the name attribute on the menu tag.

Sub menus: Submenues are defined by the entry tag. Each entry consists of a name (display name), a url (e.g. web page or file), and finally a type which can be edit (use system editor to open link) and page (use system browser to browse to link)

Monitors: A monitor is defined by the monitor tag. Monitors contains name (attribute), monitorUrl (e.g. http://localhost), initWait (the time to go before the first event is fired after start of TrayMonitor), delayBetweenRuns (guess!), useProxy (whether to use proxy or not), logFile (log file on disk), and some optional tags: threshold (displayes a "threshold breached" in the log file), and a list of request parameters (key/value pair - e.g. user and password).