<?xml version="1.0"?>

<!--
   Labrador Configuration File
   $Id: labrador.xml,v 1.1.1.1 2003/11/14 00:02:09 bradford Exp $

   This is the Labrador configuration file.  It performs the initial
   bootstrapping for the Broker.

   Labrador automatically reads a default version of this file from
   labrador.jar if no configuration file is specified when the Broker's
   VM initializes.  The default configuration can be overridden by
   specifying the following VM property in the vm.cfg file:

      -Dlabrador.config=<config file>

   Additionally, any modifications to this file are automatically
   included in labrador.jar during the next source rebuild.

   Components are loaded in the following order, regardless of their
   order in the configuration file:

      resolver     A Resolver is a Labrador Instance resolver
      describer    A Describer is an Instance interface describer
      handler      A Handler is a content protocol handler
      filter       A Filter is a processing chain filter
      instance     An Instance is a Labrador service Instance

   Each component is based on the same schema.  The only component type
   that operates differently than others are Instances, who must
   register themselves with their appropriate Resolver rather than the
   Broker.

   Attributes:

      class        Class identifies the Java class that is loaded to
                   represent the component.

      static       Static identifies the component as being statically
                   initialized.  This implies that it will register
                   itself with the Broker instead of the Broker doing
                   the work.  If static is true, the bootstrapping
                   system will also look for initializer and name
                   attributes.

      initializer  Initializer instructs the bootstrapping system to
                   invoke a static initializer method against the
                   component's Class.  If a name attribute is
                   specified, it will be passed as a String parameter
                   to the initializer method, otherwise, the method
                   will be called with void parameters.

      name         Name is the value that will be passed to
                   constructors or static initializers if it is
                   specified.

   Labrador components are loaded in such a way that they are first
   constructed or initialized, and then the instance or class is
   checked for a configuration method.  This method must be a static
   setConfig(Configuration) method for a static initialized class,
   or for a non-static constructed object, the object's class must
   implement the Configurable interface.  If either conditions are
   met, the Configuration instance for that component is passed to it.
-->

<labrador>
   <resolver class="com.dbxml.labrador.objects.ObjectResolver"
             static="true"
             initializer="initialize"/>

   <describer class="com.dbxml.labrador.describers.SWSSDescriber"/>
   <describer class="com.dbxml.labrador.describers.WSDLDescriber"/>

   <handler class="com.dbxml.labrador.xmlrpc.XMLRPCHandler"/>

   <!-- SOAP doesn't actually work in Labrador yet
   <handler class="com.dbxml.labrador.soap.SOAPHandler"/>
   -->

   <handler class="com.dbxml.labrador.rest.RESTHandler">
      <mime-mappings>
         <mime-mapping ext="abs" type="audio/x-mpeg"/>
         <mime-mapping ext="ai" type="application/postscript"/>
         <mime-mapping ext="aif" type="audio/x-aiff"/>
         <mime-mapping ext="aifc" type="audio/x-aiff"/>
         <mime-mapping ext="aiff" type="audio/x-aiff"/>
         <mime-mapping ext="aim" type="application/x-aim"/>
         <mime-mapping ext="art" type="image/x-jg"/>
         <mime-mapping ext="asf" type="video/x-ms-asf"/>
         <mime-mapping ext="asx" type="video/x-ms-asf"/>
         <mime-mapping ext="au" type="audio/basic"/>
         <mime-mapping ext="avi" type="video/x-msvideo"/>
         <mime-mapping ext="avx" type="video/x-rad-screenplay"/>
         <mime-mapping ext="bcpio" type="application/x-bcpio"/>
         <mime-mapping ext="bin" type="application/octet-stream"/>
         <mime-mapping ext="bmp" type="image/bmp"/>
         <mime-mapping ext="body" type="text/html"/>
         <mime-mapping ext="cdf" type="application/x-cdf"/>
         <mime-mapping ext="cer" type="application/x-x509-ca-cert"/>
         <mime-mapping ext="class" type="application/java"/>
         <mime-mapping ext="cpio" type="application/x-cpio"/>
         <mime-mapping ext="csh" type="application/x-csh"/>
         <mime-mapping ext="css" type="text/css"/>
         <mime-mapping ext="dib" type="image/bmp"/>
         <mime-mapping ext="doc" type="application/msword"/>
         <mime-mapping ext="dtd" type="text/plain"/>
         <mime-mapping ext="dv" type="video/x-dv"/>
         <mime-mapping ext="dvi" type="application/x-dvi"/>
         <mime-mapping ext="eps" type="application/postscript"/>
         <mime-mapping ext="etx" type="text/x-setext"/>
         <mime-mapping ext="exe" type="application/octet-stream"/>
         <mime-mapping ext="gif" type="image/gif"/>
         <mime-mapping ext="gtar" type="application/x-gtar"/>
         <mime-mapping ext="gz" type="application/x-gzip"/>
         <mime-mapping ext="hdf" type="application/x-hdf"/>
         <mime-mapping ext="hqx" type="application/mac-binhex40"/>
         <mime-mapping ext="htc" type="text/x-component"/>
         <mime-mapping ext="htm" type="text/html"/>
         <mime-mapping ext="html" type="text/html"/>
         <mime-mapping ext="hqx" type="application/mac-binhex40"/>
         <mime-mapping ext="ief" type="image/ief"/>
         <mime-mapping ext="jad" type="text/vnd.sun.j2me.app-descriptor"/>
         <mime-mapping ext="jar" type="application/java-archive"/>
         <mime-mapping ext="java" type="text/plain"/>
         <mime-mapping ext="jnlp" type="application/x-java-jnlp-file"/>
         <mime-mapping ext="jpe" type="image/jpeg"/>
         <mime-mapping ext="jpeg" type="image/jpeg"/>
         <mime-mapping ext="jpg" type="image/jpeg"/>
         <mime-mapping ext="js" type="text/javascript"/>
         <mime-mapping ext="kar" type="audio/x-midi"/>
         <mime-mapping ext="latex" type="application/x-latex"/>
         <mime-mapping ext="m3u" type="audio/x-mpegurl"/>
         <mime-mapping ext="mac" type="image/x-macpaint"/>
         <mime-mapping ext="man" type="application/x-troff-man"/>
         <mime-mapping ext="me" type="application/x-troff-me"/>
         <mime-mapping ext="mid" type="audio/x-midi"/>
         <mime-mapping ext="midi" type="audio/x-midi"/>
         <mime-mapping ext="mif" type="application/x-mif"/>
         <mime-mapping ext="mov" type="video/quicktime"/>
         <mime-mapping ext="movie" type="video/x-sgi-movie"/>
         <mime-mapping ext="mp1" type="audio/x-mpeg"/>
         <mime-mapping ext="mp2" type="audio/x-mpeg"/>
         <mime-mapping ext="mp3" type="audio/x-mpeg"/>
         <mime-mapping ext="mpa" type="audio/x-mpeg"/>
         <mime-mapping ext="mpe" type="video/mpeg"/>
         <mime-mapping ext="mpeg" type="video/mpeg"/>
         <mime-mapping ext="mpega" type="audio/x-mpeg"/>
         <mime-mapping ext="mpg" type="video/mpeg"/>
         <mime-mapping ext="mpv2" type="video/mpeg2"/>
         <mime-mapping ext="ms" type="application/x-wais-source"/>
         <mime-mapping ext="nc" type="application/x-netcdf"/>
         <mime-mapping ext="oda" type="application/oda"/>
         <mime-mapping ext="pbm" type="image/x-portable-bitmap"/>
         <mime-mapping ext="pct" type="image/pict"/>
         <mime-mapping ext="pdf" type="application/pdf"/>
         <mime-mapping ext="pgm" type="image/x-portable-graymap"/>
         <mime-mapping ext="pic" type="image/pict"/>
         <mime-mapping ext="pict" type="image/pict"/>
         <mime-mapping ext="pls" type="audio/x-scpls"/>
         <mime-mapping ext="png" type="image/png"/>
         <mime-mapping ext="pnm" type="image/x-portable-anymap"/>
         <mime-mapping ext="pnt" type="image/x-macpaint"/>
         <mime-mapping ext="ppm" type="image/x-portable-pixmap"/>
         <mime-mapping ext="ps" type="application/postscript"/>
         <mime-mapping ext="psd" type="image/x-photoshop"/>
         <mime-mapping ext="qt" type="video/quicktime"/>
         <mime-mapping ext="qti" type="image/x-quicktime"/>
         <mime-mapping ext="qtif" type="image/x-quicktime"/>
         <mime-mapping ext="ras" type="image/x-cmu-raster"/>
         <mime-mapping ext="rgb" type="image/x-rgb"/>
         <mime-mapping ext="rm" type="application/vnd.rn-realmedia"/>
         <mime-mapping ext="roff" type="application/x-troff"/>
         <mime-mapping ext="rtf" type="application/rtf"/>
         <mime-mapping ext="rtx" type="text/richtext"/>
         <mime-mapping ext="sh" type="application/x-sh"/>
         <mime-mapping ext="shar" type="application/x-shar"/>
         <mime-mapping ext="smf" type="audio/x-midi"/>
         <mime-mapping ext="snd" type="audio/basic"/>
         <mime-mapping ext="src" type="application/x-wais-source"/>
         <mime-mapping ext="sv4cpio" type="application/x-sv4cpio"/>
         <mime-mapping ext="sv4crc" type="application/x-sv4crc"/>
         <mime-mapping ext="swf" type="application/x-shockwave-flash"/>
         <mime-mapping ext="t" type="application/x-troff"/>
         <mime-mapping ext="tar" type="application/x-tar"/>
         <mime-mapping ext="tcl" type="application/x-tcl"/>
         <mime-mapping ext="tex" type="application/x-tex"/>
         <mime-mapping ext="texi" type="application/x-texinfo"/>
         <mime-mapping ext="texinfo" type="application/x-texinfo"/>
         <mime-mapping ext="tif" type="image/tiff"/>
         <mime-mapping ext="tiff" type="image/tiff"/>
         <mime-mapping ext="tr" type="application/x-troff"/>
         <mime-mapping ext="tsv" type="text/tab-separated-values"/>
         <mime-mapping ext="txt" type="text/plain"/>
         <mime-mapping ext="ulw" type="audio/basic"/>
         <mime-mapping ext="ustar" type="application/x-ustar"/>
         <mime-mapping ext="xbm" type="image/x-xbitmap"/>
         <mime-mapping ext="xpm" type="image/x-xpixmap"/>
         <mime-mapping ext="xwd" type="image/x-xwindowdump"/>
         <mime-mapping ext="wav" type="audio/x-wav"/>
         <mime-mapping ext="wbmp" type="image/vnd.wap.wbmp"/>
         <mime-mapping ext="wml" type="text/vnd.wap.wml"/>
         <mime-mapping ext="wmlc" type="application/vnd.wap.wmlc"/>
         <mime-mapping ext="wmls" type="text/vnd.wap.wmls"/>
         <mime-mapping ext="wmlscriptc" type="application/vnd.wap.wmlscriptc"/>
         <mime-mapping ext="wrl" type="x-world/x-vrml"/>
         <mime-mapping ext="xml" type="text/xml"/>
         <mime-mapping ext="xsl" type="text/xml"/>
         <mime-mapping ext="xsd" type="text/xml"/>
         <mime-mapping ext="Z" type="application/x-compress"/>
         <mime-mapping ext="z" type="application/x-compress"/>
         <mime-mapping ext="zip" type="application/zip"/>
      </mime-mappings>
   </handler>

   <filter class="com.dbxml.labrador.sessions.SessionFilter">
      <!-- 
         This timeout value is in seconds, and defaults to 10 minutes 
      -->
      <context path="/" timeout="600"/>
   </filter>
   
   <filter class="com.dbxml.labrador.filters.LoggingFilter"
           filename="./logs/labrador.log">
      <items>
         <item type="timestamp"/>
         <item type="property" name="Request-method"/>
         <item type="property" name="Remote-host"/>
         <item type="protocol"/>
         <item type="id"/>
         <item type="header" name="Content-length"/>
      </items>
   </filter>

   <instance class="com.dbxml.labrador.services.InterfaceService"/>
   <instance class="com.dbxml.labrador.services.NamingService"/>
</labrador>

