blob: 3a6eec1143db51a681b007ccf78e368afcbb0db4 [file] [log] [blame]
<!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">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</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>&nbsp;<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>acquire­Marshaller()</code></a> or
<a href="#acquireUnmarshaller()"><code>acquire­Unmarshaller()</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>Marshaller­Pool</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">Marshaller­Pool</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>&lt;<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>?&gt;&nbsp;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">Marshaller­Pool</a><wbr>(JAXBContext&nbsp;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>&lt;<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>?&gt;&nbsp;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">acquire­Marshaller</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">acquire­Unmarshaller</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">create­Marshaller</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">create­Unmarshaller</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&nbsp;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&nbsp;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&nbsp;<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">get­Class</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">hash­Code</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">notify­All</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">to­String</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>&nbsp;<span class="return-type">JAXBContext</span>&nbsp;<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>create­Marshaller()</code></a></li>
<li><a href="#createUnmarshaller()"><code>create­Unmarshaller()</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="&lt;init&gt;(java.util.Map)">
<h3>MarshallerPool</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<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>&lt;<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>?&gt;&nbsp;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>create­Marshaller()</code></a>
or <a href="#createUnmarshaller()"><code>create­Unmarshaller()</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="&lt;init&gt;(javax.xml.bind.JAXBContext,java.util.Map)">
<h3>MarshallerPool</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">MarshallerPool</span><wbr><span class="parameters">(JAXBContext&nbsp;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>&lt;<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>?&gt;&nbsp;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>create­Marshaller()</code></a>
or <a href="#createUnmarshaller()"><code>create­Unmarshaller()</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>&nbsp;<span class="return-type">Marshaller</span>&nbsp;<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>&nbsp;<span class="return-type">Unmarshaller</span>&nbsp;<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>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">recycle</span><wbr><span class="parameters">(Marshaller&nbsp;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>acquire­Marshaller()</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>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">recycle</span><wbr><span class="parameters">(Unmarshaller&nbsp;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>acquire­Unmarshaller()</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>&nbsp;<span class="return-type">Marshaller</span>&nbsp;<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>acquire­Marshaller()</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>&nbsp;<span class="return-type">Unmarshaller</span>&nbsp;<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>acquire­Unmarshaller()</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 &#169; 2010&#x2013;2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>