| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (19) --> |
| <title>MarshallerPool (Apache SIS 1.3 API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.sis.xml, class: MarshallerPool"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.xml.MarshallerPool class"> |
| <meta name="keywords" content="context"> |
| <meta name="keywords" content="acquireMarshaller()"> |
| <meta name="keywords" content="acquireUnmarshaller()"> |
| <meta name="keywords" content="recycle()"> |
| <meta name="keywords" content="createMarshaller()"> |
| <meta name="keywords" content="createUnmarshaller()"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../sis.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jquery-3.6.0.min.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var pathtoroot = "../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span></button> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="class-use/MarshallerPool.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#class">Help</a></li> |
| </ul> |
| <ul class="sub-nav-list-small"> |
| <li> |
| <p>Summary:</p> |
| <ul> |
| <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> |
| </li> |
| <li> |
| <p>Detail:</p> |
| <ul> |
| <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> |
| </li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div id="navbar-sub-list"> |
| <ul class="sub-nav-list"> |
| <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="sub-nav-list"> |
| <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> |
| <div class="nav-list-search"><a href="../../../../search.html">SEARCH</a> |
| <input type="text" id="search-input" disabled placeholder="Search"> |
| <input type="reset" id="reset-button" disabled value="reset"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.sis.xml</a></div> |
| <h1 title="Class MarshallerPool" class="title">Class MarshallerPool</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> |
| <div class="inheritance">MarshallerPool</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">MarshallerPool</span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div> |
| <div class="block">Creates and configures <code>Marshaller</code> or <code>Unmarshaller</code> objects for use with SIS. |
| Users fetch (un)marshallers by calls to the <a href="#acquireMarshaller()"><code>acquireMarshaller()</code></a> or |
| <a href="#acquireUnmarshaller()"><code>acquireUnmarshaller()</code></a> methods, and can restitute the (un)marshaller to the pool |
| after usage like below: |
| |
| <blockquote><pre>Marshaller marshaller = pool.<b>acquireMarshaller</b>(); |
| marshaller.<b>marchall</b>(...); |
| pool.<b>recycle</b>(marshaller);</pre></blockquote> |
| |
| <h2>Configuring (un)marshallers</h2> |
| The (un)marshallers created by this class can optionally by configured with the SIS-specific |
| properties defined in the <a href="XML.html" title="class in org.apache.sis.xml"><code>XML</code></a> class, in addition to JAXB standard properties. |
| |
| <h2>Thread safety</h2> |
| The same <code>MarshallerPool</code> instance can be safely used by many threads without synchronization |
| on the part of the caller. Subclasses should make sure that any overridden methods remain safe to call |
| from multiple threads.</div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.3</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list-long"> |
| <li><a href="XML.html" title="class in org.apache.sis.xml"><code>XML</code></a></li> |
| <li><a href="http://jaxb.java.net/guide/Performance_and_thread_safety.html">JAXB Performance and thread-safety</a></li> |
| </ul> |
| </dd> |
| |
| <p><font size="-1">Defined in the <code>sis-metadata</code> module</font></p> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <li> |
| <section class="field-summary" id="field-summary"> |
| <h2>Field Summary</h2> |
| <div class="caption"><span>Fields</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Field</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>protected final JAXBContext</code></div> |
| <div class="col-second even-row-color"><code><a href="#context" class="member-name-link">context</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">The JAXB context to use for creating marshaller and unmarshaller.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table two-column-summary"> |
| <div class="table-header col-first">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.util.Map)" class="member-name-link">MarshallerPool</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> properties)</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Creates a new factory using the SIS default <code>JAXBContext</code> instance.</div> |
| </div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(javax.xml.bind.JAXBContext,java.util.Map)" class="member-name-link">MarshallerPool</a><wbr>(JAXBContext context, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> properties)</code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Creates a new factory using the given JAXB context.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>Marshaller</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#acquireMarshaller()" class="member-name-link">acquireMarshaller</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns a JAXB marshaller from the pool.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>Unmarshaller</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#acquireUnmarshaller()" class="member-name-link">acquireUnmarshaller</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns a JAXB unmarshaller from the pool.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected Marshaller</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#createMarshaller()" class="member-name-link">createMarshaller</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Creates an configures a new JAXB marshaller.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected Unmarshaller</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#createUnmarshaller()" class="member-name-link">createUnmarshaller</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Creates an configures a new JAXB unmarshaller.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#recycle(javax.xml.bind.Marshaller)" class="member-name-link">recycle</a><wbr>(Marshaller marshaller)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Declares a marshaller as available for reuse.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#recycle(javax.xml.bind.Unmarshaller)" class="member-name-link">recycle</a><wbr>(Unmarshaller unmarshaller)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Declares a unmarshaller as available for reuse.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-Object">Methods inherited from class <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <li> |
| <section class="field-details" id="field-detail"> |
| <h2>Field Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="context"> |
| <h3>context</h3> |
| <div class="member-signature"><span class="modifiers">protected final</span> <span class="return-type">JAXBContext</span> <span class="element-name">context</span></div> |
| <div class="block">The JAXB context to use for creating marshaller and unmarshaller.</div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#createMarshaller()"><code>createMarshaller()</code></a></li> |
| <li><a href="#createUnmarshaller()"><code>createUnmarshaller()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>(java.util.Map)"> |
| <h3>MarshallerPool</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">MarshallerPool</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> properties)</span> |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Creates a new factory using the SIS default <code>JAXBContext</code> instance. |
| The <code>properties</code> map is optional. If non-null, then the keys can be <a href="XML.html" title="class in org.apache.sis.xml"><code>XML</code></a> constants or the |
| names of any other properties recognized by <em>both</em> <code>Marshaller</code> and <code>Unmarshaller</code> |
| implementations. |
| |
| <p><b>Tip:</b> if the properties for the <code>Marshaller</code> differ from the properties |
| for the <code>Unmarshaller</code>, then consider overriding the <a href="#createMarshaller()"><code>createMarshaller()</code></a> |
| or <a href="#createUnmarshaller()"><code>createUnmarshaller()</code></a> methods instead.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>properties</code> - the properties to be given to the (un)marshaller, or <code>null</code> if none.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if the JAXB context cannot be created.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(javax.xml.bind.JAXBContext,java.util.Map)"> |
| <h3>MarshallerPool</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">MarshallerPool</span><wbr><span class="parameters">(JAXBContext context, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> properties)</span> |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Creates a new factory using the given JAXB context. |
| The <code>properties</code> map is optional. If non-null, then the keys can be <a href="XML.html" title="class in org.apache.sis.xml"><code>XML</code></a> constants or the |
| names of any other properties recognized by <em>both</em> <code>Marshaller</code> and <code>Unmarshaller</code> |
| implementations. |
| |
| <p><b>Tip:</b> if the properties for the <code>Marshaller</code> differ from the properties |
| for the <code>Unmarshaller</code>, then consider overriding the <a href="#createMarshaller()"><code>createMarshaller()</code></a> |
| or <a href="#createUnmarshaller()"><code>createUnmarshaller()</code></a> methods instead.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>context</code> - the JAXB context.</dd> |
| <dd><code>properties</code> - the properties to be given to the (un)marshaller, or <code>null</code> if none.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if the marshaller pool cannot be created.</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="acquireMarshaller()"> |
| <h3>acquireMarshaller</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">Marshaller</span> <span class="element-name">acquireMarshaller</span>() |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Returns a JAXB marshaller from the pool. If there is no marshaller currently available |
| in the pool, then this method will <a href="#createMarshaller()">create</a> a new one. |
| |
| <p>This method shall be used as below:</p> |
| |
| <blockquote><pre>Marshaller marshaller = pool.<b>acquireMarshaller</b>(); |
| marshaller.<b>marchall</b>(...); |
| pool.<b>recycle</b>(marshaller);</pre></blockquote> |
| |
| Note that <a href="#recycle(javax.xml.bind.Marshaller)"><code>recycle(Marshaller)</code></a> shall not be invoked in case of exception, |
| since the marshaller may be in an invalid state.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>a marshaller configured for formatting OGC/ISO XML.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if an error occurred while creating and configuring a marshaller.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="acquireUnmarshaller()"> |
| <h3>acquireUnmarshaller</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">Unmarshaller</span> <span class="element-name">acquireUnmarshaller</span>() |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Returns a JAXB unmarshaller from the pool. If there is no unmarshaller currently available |
| in the pool, then this method will <a href="#createUnmarshaller()">create</a> a new one. |
| |
| <p>This method shall be used as below:</p> |
| |
| <blockquote><pre>Unmarshaller unmarshaller = pool.<b>acquireUnmarshaller</b>(); |
| Unmarshaller.<b>unmarchall</b>(...); |
| pool.<b>recycle</b>(unmarshaller);</pre></blockquote> |
| |
| Note that <a href="#recycle(javax.xml.bind.Unmarshaller)"><code>recycle(Unmarshaller)</code></a> shall not be invoked in case of exception, |
| since the unmarshaller may be in an invalid state.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>a unmarshaller configured for parsing OGC/ISO XML.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if an error occurred while creating and configuring the unmarshaller.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="recycle(javax.xml.bind.Marshaller)"> |
| <h3>recycle</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">recycle</span><wbr><span class="parameters">(Marshaller marshaller)</span></div> |
| <div class="block">Declares a marshaller as available for reuse. |
| The caller should not use anymore the given marshaller after this method call, |
| since the marshaller may be re-used by another thread at any time after recycle. |
| |
| <h4>Cautions</h4> |
| <ul> |
| <li>Do not invoke this method if the marshaller threw an exception, since the |
| marshaller may be in an invalid state. In particular, this method should not |
| be invoked in a <code>finally</code> block.</li> |
| <li>Do not invoke this method twice for the same marshaller, unless the marshaller |
| has been obtained by a new call to <a href="#acquireMarshaller()"><code>acquireMarshaller()</code></a>. |
| In case of doubt, it is better to not recycle the marshaller at all.</li> |
| </ul> |
| |
| Note that this method does not close any output stream. |
| Closing the marshaller stream is caller's or JAXB responsibility.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>marshaller</code> - the marshaller to return to the pool.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="recycle(javax.xml.bind.Unmarshaller)"> |
| <h3>recycle</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">recycle</span><wbr><span class="parameters">(Unmarshaller unmarshaller)</span></div> |
| <div class="block">Declares a unmarshaller as available for reuse. |
| The caller should not use anymore the given unmarshaller after this method call, |
| since the unmarshaller may be re-used by another thread at any time after recycle. |
| |
| <h4>Cautions</h4> |
| <ul> |
| <li>Do not invoke this method if the unmarshaller threw an exception, since the |
| unmarshaller may be in an invalid state. In particular, this method should not |
| be invoked in a <code>finally</code> block.</li> |
| <li>Do not invoke this method twice for the same unmarshaller, unless the unmarshaller |
| has been obtained by a new call to <a href="#acquireUnmarshaller()"><code>acquireUnmarshaller()</code></a>. |
| In case of doubt, it is better to not recycle the unmarshaller at all.</li> |
| </ul> |
| |
| Note that this method does not close any input stream. |
| Closing the unmarshaller stream is caller's or JAXB responsibility.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>unmarshaller</code> - the unmarshaller to return to the pool.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="createMarshaller()"> |
| <h3>createMarshaller</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">Marshaller</span> <span class="element-name">createMarshaller</span>() |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Creates an configures a new JAXB marshaller. |
| This method is invoked only when no existing marshaller is available in the pool. |
| Subclasses can override this method if they need to change the marshaller configuration.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>a new marshaller configured for formatting OGC/ISO XML.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if an error occurred while creating and configuring the marshaller.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#context"><code>context</code></a></li> |
| <li><a href="#acquireMarshaller()"><code>acquireMarshaller()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="createUnmarshaller()"> |
| <h3>createUnmarshaller</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">Unmarshaller</span> <span class="element-name">createUnmarshaller</span>() |
| throws <span class="exceptions">JAXBException</span></div> |
| <div class="block">Creates an configures a new JAXB unmarshaller. |
| This method is invoked only when no existing unmarshaller is available in the pool. |
| Subclasses can override this method if they need to change the unmarshaller configuration.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>a new unmarshaller configured for parsing OGC/ISO XML.</dd> |
| <dt>Throws:</dt> |
| <dd><code>JAXBException</code> - if an error occurred while creating and configuring the unmarshaller.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#context"><code>context</code></a></li> |
| <li><a href="#acquireUnmarshaller()"><code>acquireUnmarshaller()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2010–2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |