| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.11) on Mon May 17 19:14:02 CDT 2021 --> |
| <title>XmlConfiguration (Jetty :: Project 9.4.41.v20210516 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2021-05-17"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-3.5.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="XmlConfiguration (Jetty :: Project 9.4.41.v20210516 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":9,"i6":9,"i7":10,"i8":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../"; |
| var useModuleDirectories = false; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/XmlConfiguration.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.eclipse.jetty.xml</a></div> |
| <h2 title="Class XmlConfiguration" class="title">Class XmlConfiguration</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.eclipse.jetty.xml.XmlConfiguration</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <pre>public class <span class="typeNameLabel">XmlConfiguration</span> |
| extends java.lang.Object</pre> |
| <div class="block"><p>Configures objects from XML.</p> |
| <p>This class reads an XML file conforming to the configure.dtd DTD |
| and uses it to configure and object by calling set, put or other methods on the object.</p> |
| <p>The actual XML file format may be changed (eg to spring XML) by implementing the |
| <a href="ConfigurationProcessorFactory.html" title="interface in org.eclipse.jetty.xml"><code>ConfigurationProcessorFactory</code></a> interface to be found by the |
| <code>ServiceLoader</code> by using the DTD and first tag element in the file. |
| Note that DTD will be null if validation is off.</p> |
| <p>The configuration can be parameterised with properties that are looked up via the |
| Property XML element and set on the configuration via the map returned from |
| <a href="#getProperties()"><code>getProperties()</code></a></p> |
| <p>The configuration can create and lookup beans by ID. If multiple configurations are used, then it |
| is good practise to copy the entries from the <a href="#getIdMap()"><code>getIdMap()</code></a> of a configuration to the next |
| configuration so that they can share an ID space for beans.</p></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static java.util.Comparator<java.lang.reflect.Executable></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#EXECUTABLE_COMPARATOR">EXECUTABLE_COMPARATOR</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.io.InputStream)">XmlConfiguration</a></span>​(java.io.InputStream configuration)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">use Constructor which has location information</div> |
| </div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.String)">XmlConfiguration</a></span>​(java.lang.String configuration)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">use Constructor which has location information</div> |
| </div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.net.URL)">XmlConfiguration</a></span>​(java.net.URL configuration)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">use <a href="#%3Cinit%3E(org.eclipse.jetty.util.resource.Resource)"><code>XmlConfiguration(org.eclipse.jetty.util.resource.Resource)</code></a> instead due to escaping issues</div> |
| </div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.eclipse.jetty.util.resource.Resource)">XmlConfiguration</a></span>​(<a href="../util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> resource)</code></th> |
| <td class="colLast"> |
| <div class="block">Reads and parses the XML configuration file.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>java.lang.Object</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#configure()">configure</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Applies the XML configuration script.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>java.lang.Object</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#configure(java.lang.Object)">configure</a></span>​(java.lang.Object obj)</code></th> |
| <td class="colLast"> |
| <div class="block">Applies the XML configuration script to the given object.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>java.util.Map<java.lang.String,​java.lang.Object></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getIdMap()">getIdMap</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Get the map of ID String to Objects that is used to hold |
| and lookup any objects by ID.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>java.util.Map<java.lang.String,​java.lang.String></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getProperties()">getProperties</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Get the map of properties used by the Property XML element |
| to parametrize configuration.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#initializeDefaults(java.lang.Object)">initializeDefaults</a></span>​(java.lang.Object object)</code></th> |
| <td class="colLast"> |
| <div class="block">Initialize a new Object defaults.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#main(java.lang.String...)">main</a></span>​(java.lang.String... args)</code></th> |
| <td class="colLast"> |
| <div class="block">Runs the XML configurations as a main application.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#normalizeURI(java.lang.String)">normalizeURI</a></span>​(java.lang.String uri)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setJettyStandardIdsAndProperties(java.lang.Object,org.eclipse.jetty.util.resource.Resource)">setJettyStandardIdsAndProperties</a></span>​(java.lang.Object server, |
| <a href="../util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> webapp)</code></th> |
| <td class="colLast"> |
| <div class="block">Set the standard IDs and properties expected in a jetty XML file: |
| |
| RefId Server |
| Property jetty.home |
| Property jetty.home.uri |
| Property jetty.base |
| Property jetty.base.uri |
| Property jetty.webapps |
| Property jetty.webapps.uri |
| </div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="EXECUTABLE_COMPARATOR"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>EXECUTABLE_COMPARATOR</h4> |
| <pre>public static final java.util.Comparator<java.lang.reflect.Executable> EXECUTABLE_COMPARATOR</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>(org.eclipse.jetty.util.resource.Resource)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>XmlConfiguration</h4> |
| <pre>public XmlConfiguration​(<a href="../util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> resource) |
| throws org.xml.sax.SAXException, |
| java.io.IOException</pre> |
| <div class="block">Reads and parses the XML configuration file.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>resource</code> - the Resource to the XML configuration</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if the configuration could not be read</dd> |
| <dd><code>org.xml.sax.SAXException</code> - if the configuration could not be parsed</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="<init>(java.net.URL)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>XmlConfiguration</h4> |
| <pre>@Deprecated |
| public XmlConfiguration​(java.net.URL configuration) |
| throws org.xml.sax.SAXException, |
| java.io.IOException</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">use <a href="#%3Cinit%3E(org.eclipse.jetty.util.resource.Resource)"><code>XmlConfiguration(org.eclipse.jetty.util.resource.Resource)</code></a> instead due to escaping issues</div> |
| </div> |
| <div class="block">Reads and parses the XML configuration file.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>configuration</code> - the URL of the XML configuration</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if the configuration could not be read</dd> |
| <dd><code>org.xml.sax.SAXException</code> - if the configuration could not be parsed</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="<init>(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>XmlConfiguration</h4> |
| <pre>@Deprecated |
| public XmlConfiguration​(java.lang.String configuration) |
| throws org.xml.sax.SAXException, |
| java.io.IOException</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">use Constructor which has location information</div> |
| </div> |
| <div class="block">Reads and parses the XML configuration string.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>configuration</code> - String of XML configuration commands excluding the normal XML preamble. |
| The String should start with a "<Configure ....>" element.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if the configuration could not be read</dd> |
| <dd><code>org.xml.sax.SAXException</code> - if the configuration could not be parsed</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="<init>(java.io.InputStream)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>XmlConfiguration</h4> |
| <pre>@Deprecated |
| public XmlConfiguration​(java.io.InputStream configuration) |
| throws org.xml.sax.SAXException, |
| java.io.IOException</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">use Constructor which has location information</div> |
| </div> |
| <div class="block">Reads and parses the XML configuration stream.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>configuration</code> - An input stream containing a complete configuration file</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if the configuration could not be read</dd> |
| <dd><code>org.xml.sax.SAXException</code> - if the configuration could not be parsed</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="setJettyStandardIdsAndProperties(java.lang.Object,org.eclipse.jetty.util.resource.Resource)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setJettyStandardIdsAndProperties</h4> |
| <pre class="methodSignature">public void setJettyStandardIdsAndProperties​(java.lang.Object server, |
| <a href="../util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> webapp)</pre> |
| <div class="block">Set the standard IDs and properties expected in a jetty XML file: |
| <ul> |
| <li>RefId Server</li> |
| <li>Property jetty.home</li> |
| <li>Property jetty.home.uri</li> |
| <li>Property jetty.base</li> |
| <li>Property jetty.base.uri</li> |
| <li>Property jetty.webapps</li> |
| <li>Property jetty.webapps.uri</li> |
| </ul></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>server</code> - The Server object to set</dd> |
| <dd><code>webapp</code> - The webapps Resource</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="normalizeURI(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>normalizeURI</h4> |
| <pre class="methodSignature">public static java.lang.String normalizeURI​(java.lang.String uri)</pre> |
| </li> |
| </ul> |
| <a id="toString()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre class="methodSignature">public java.lang.String toString()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code>toString</code> in class <code>java.lang.Object</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getIdMap()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getIdMap</h4> |
| <pre class="methodSignature">public java.util.Map<java.lang.String,​java.lang.Object> getIdMap()</pre> |
| <div class="block">Get the map of ID String to Objects that is used to hold |
| and lookup any objects by ID. |
| <p> |
| A New, Get or Call XML element may have an |
| id attribute which will cause the resulting object to be placed into |
| this map. A Ref XML element will lookup an object from this map.</p> |
| <p> |
| When chaining configuration files, it is good practise to copy the |
| ID entries from the ID map to the map of the next configuration, so |
| that they may share an ID space |
| </p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A modifiable map of ID strings to Objects</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getProperties()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getProperties</h4> |
| <pre class="methodSignature">public java.util.Map<java.lang.String,​java.lang.String> getProperties()</pre> |
| <div class="block">Get the map of properties used by the Property XML element |
| to parametrize configuration.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A modifiable map of properties.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="configure(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>configure</h4> |
| <pre class="methodSignature">public java.lang.Object configure​(java.lang.Object obj) |
| throws java.lang.Exception</pre> |
| <div class="block">Applies the XML configuration script to the given object.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>obj</code> - The object to be configured, which must be of a type or super type |
| of the class attribute of the <Configure> element.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the configured object</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.Exception</code> - if the configuration fails</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="configure()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>configure</h4> |
| <pre class="methodSignature">public java.lang.Object configure() |
| throws java.lang.Exception</pre> |
| <div class="block">Applies the XML configuration script. |
| If the root element of the configuration has an ID, an object is looked up by ID and its type checked |
| against the root element's type. |
| Otherwise a new object of the type specified by the root element is created.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The newly created configured object.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.Exception</code> - if the configuration fails</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="initializeDefaults(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>initializeDefaults</h4> |
| <pre class="methodSignature">public void initializeDefaults​(java.lang.Object object)</pre> |
| <div class="block">Initialize a new Object defaults. |
| <p>This method must be called by any <a href="ConfigurationProcessor.html" title="interface in org.eclipse.jetty.xml"><code>ConfigurationProcessor</code></a> when it |
| creates a new instance of an object before configuring it, so that a derived |
| XmlConfiguration class may inject default values.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>object</code> - the object to initialize defaults on</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="main(java.lang.String...)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>main</h4> |
| <pre class="methodSignature">public static void main​(java.lang.String... args) |
| throws java.lang.Exception</pre> |
| <div class="block">Runs the XML configurations as a main application. |
| The command line is used to obtain properties files (must be named '*.properties') and XmlConfiguration files. |
| <p> |
| Any property file on the command line is added to a combined Property instance that is passed to each configuration file via |
| <a href="#getProperties()"><code>getProperties()</code></a>. |
| <p> |
| Each configuration file on the command line is used to create a new XmlConfiguration instance and the |
| <a href="#configure()"><code>configure()</code></a> method is used to create the configured object. |
| If the resulting object is an instance of <a href="../util/component/LifeCycle.html" title="interface in org.eclipse.jetty.util.component"><code>LifeCycle</code></a>, then it is started. |
| <p> |
| Any IDs created in a configuration are passed to the next configuration file on the command line using <a href="#getIdMap()"><code>getIdMap()</code></a>. |
| This allows objects with IDs created in one config file to be referenced in subsequent config files on the command line.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>args</code> - array of property and xml configuration filenames or <a href="../util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource"><code>Resource</code></a>s.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.Exception</code> - if the XML configurations cannot be run</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/XmlConfiguration.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 1995–2021 <a href="https://webtide.com">Webtide</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |