Initial spec for RuntimeDelegate, needs expanding.

svn path=/trunk/; revision=131
diff --git a/spec/chapters/delegate.tex b/spec/chapters/delegate.tex
new file mode 100644
index 0000000..5b12510
--- /dev/null
+++ b/spec/chapters/delegate.tex
@@ -0,0 +1,18 @@
+\chapter{Runtime Delegate}
+
+\rd\ is an abstract factory class that provides various methods for the creation of objects that implement \jaxrs\ APIs. These methods are designed for use by other \jaxrs\ API classes and are not intended to be called directly by applications.
+
+\rd\ allows an application to use a different \jaxrs\ implementations without any code changes.
+
+An implementation of \jaxrs\ MUST provide a concrete subclass of \rd. Such a class MUST have a public constructor which takes no arguments.
+
+\section{Configuration}
+
+The \rd\ implementation class is determined using the following algorithm. The steps listed below 
+are performed in sequence. At each step, at most one candidate implementation class name will be produced. The implementation will then attempt to load the class with the given class name using the current context class loader or, missing one, the java.lang.Class.forName(String) method. As soon as a step results in an implementation class being successfully loaded, the algorithm terminates.
+\begin{enumerate}
+\item If a resource with the name of \code{META-INF/services/javax.ws.rs.ext.RuntimeDelegate} exists, then its first line, if present, is used as the UTF-8 encoded name of the implementation class. 
+\item If the \code{\$\{java.home\}/lib/jaxrs.properties} file exists and it is readable by the \code{java\-.util\-.Properties\-.load(\-InputStream)} method and it contains an entry whose key is \code{javax\-.ws\-.rs\-.ext\-.Runtime\-Delegate}, then the value of that entry is used as the name of the implementation class. 
+\item If a system property with the name \code{javax\-.xml\-.ws\-.spi\-.Provider} is defined, then its value is used as the name of the implementation class. 
+\item Finally, a default implementation class name is used. 
+\end{enumerate}
\ No newline at end of file