Services Element
Description
The services element declares a collection of classnames representing services (typically interfaces) that the component is declaring it provides.
Nested Elements
The services element may contain any number of service elements.
| service | Declaration of of a published service provided by the component. The services element may contain 0..n nested service elements. |
Examples
The following example illustrates a type descriptor that declares that the component implementation exports the service net.dpml.http.BoundedThreadPool service.
<?xml version="1.0"?>
<type xmlns="link:xsd:dpml/lang/dpml-type#1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:part="link:xsd:dpml/lang/dpml-part#1.0"
xmlns:type="link:xsd:dpml/lang/dpml-type#1.0"
xmlns:component="link:xsd:dpml/lang/dpml-component#1.0">
<info name="pool"
class="net.dpml.http.BoundedThreadPool"
version="0.0.0"
lifestyle="singleton"
collection="system"
threadsafe="true"/>
<services>
<service class="org.mortbay.thread.ThreadPool" version="1.0.0"/>
</services>
<context>
<entry key="name" class="java.lang.String" optional="true"/>
<entry key="priority" class="int" optional="true"/>
<entry key="min" class="int" optional="true"/>
<entry key="max" class="int" optional="true"/>
<entry key="daemon" class="boolean" optional="true"/>
<entry key="idle" class="int" optional="true"/>
</context>
</type>