The adapters.xml configuration file is defined by JSR-124. It configures a specific mime-type to an adapter. For example, if the client requests a jad, with mime-type: text/vnd.sun.j2me.app-descriptor, it will pass the request to the org.jvending.provisioning.adapter.MidpAdapter class. Most requests are simple content types and do not need special handling. Thus the application will pass the request to the generic handler.
The devices.xml configuration file is defined by JSR-124. It contains information that JVending will use to map HTTP request headers to a specific device type. It also contains a mapping of device type to device capabilities, thus we get a HTTP header to device capability mapping.
The matchers.xml configuration file is defined by JSR-124. It maps a specific attribute
a class (
javax.provisioning.matcher.VersionMatcher). We can use this information to match a content
requirement to device capabilities. For instance, if I have content bundle with a requirement of MIDP/1.0+ (this
information would be found within the provisioning.xml file of a PAR file) then it will match to a device that
has MIDP/2.0 capabilities. Thus, in a round about way, if we take into account the devices.xml file, we can match specific
HTTP headers to content.
The deliverables.xml configuration file is a JVending specific configuration. It tells JVending which Deliverable class to use based upon the mime-type. This allows the developer to do things like caching frequently used, and expensive mime-types, like JARS and images.
The stocking-handlers.xml file is a JVending specific configuration. JVending will use the information during the content stocking process. It consists of several parts. First, it provides the descriptor handlers that tells JVending which handler to use based upon the content mime-type. For instance, the developer can use a content handler for a jad file (provided in the standard dist) or can create a customized one for say, a bittorrent file.
The second part defines any number of content filters and a data sink. This gives the developer the ability to manipulate the content (DRM wrappers, dynamic content fetching, blocked content, etc) prior to stocking within the database.
The third part defines the stocking policies. These allow the developer to provide policy information to the handlers and filters. For instance, you can specify a DRM filter, but also turn it off or customize through a policy.
The MimeType.properties file is a JVending specific configuration. It matches content extensions to mime types. This information is used in a stocking filter that will add the mime-type to the provisioning.xml file, based upon the content extension. This will then be persisted to the catalog database. It is also used for determining the correct mime-type to return within HTTP headers during content requests.