blob: 9df3d20e48a696d9394e63b4376b4f63bcf10099 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 -->
<title>MarshallerPool (Apache SIS 1.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2019-09-20">
<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="../../../../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.3.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.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="MarshallerPool (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10};
var tabs = {65535:["t0","All 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/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">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;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:&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="subNavList">
<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>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</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>&nbsp;<a href="package-summary.html">org.apache.sis.xml</a></div>
<h2 title="Class MarshallerPool" class="title">Class MarshallerPool</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></li>
<li>
<ul class="inheritance">
<li>MarshallerPool</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public class <span class="typeNameLabel">MarshallerPool</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></pre>
<div class="block">Creates and configures <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Marshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink"><code>Marshaller</code></a> or <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Unmarshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink"><code>Unmarshaller</code></a> 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>
<div class="section">Configuring (un)marshallers</div>
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.
<div class="section">Thread safety</div>
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>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.3</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="XML.html" title="class in org.apache.sis.xml"><code>XML</code></a>,
<a href="http://jaxb.java.net/guide/Performance_and_thread_safety.html">JAXB Performance and thread-safety</a></dd>
<p><font size="-1">Defined in the <code>sis-metadata</code> module</font></p>
</dl>
</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">&nbsp;</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>protected <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBContext.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBContext</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#context">context</a></span></code></th>
<td class="colLast">
<div class="block">The JAXB context to use for creating marshaller and unmarshaller.</div>
</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">&nbsp;</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.util.Map)">MarshallerPool</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;?&gt;&nbsp;properties)</code></th>
<td class="colLast">
<div class="block">Creates a new factory using the SIS default <code>JAXBContext</code> instance.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(javax.xml.bind.JAXBContext,java.util.Map)">MarshallerPool</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBContext.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBContext</a>&nbsp;context,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;?&gt;&nbsp;properties)</code></th>
<td class="colLast">
<div class="block">Creates a new factory using the given JAXB context.</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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Marshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">Marshaller</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#acquireMarshaller()">acquireMarshaller</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a JAXB marshaller from the pool.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Unmarshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">Unmarshaller</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#acquireUnmarshaller()">acquireUnmarshaller</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a JAXB unmarshaller from the pool.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Marshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">Marshaller</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createMarshaller()">createMarshaller</a></span>()</code></th>
<td class="colLast">
<div class="block">Creates an configures a new JAXB marshaller.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Unmarshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">Unmarshaller</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createUnmarshaller()">createUnmarshaller</a></span>()</code></th>
<td class="colLast">
<div class="block">Creates an configures a new JAXB unmarshaller.</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="#recycle(javax.xml.bind.Marshaller)">recycle</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Marshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">Marshaller</a>&nbsp;marshaller)</code></th>
<td class="colLast">
<div class="block">Declares a marshaller as available for reuse.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#recycle(javax.xml.bind.Unmarshaller)">recycle</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Unmarshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">Unmarshaller</a>&nbsp;unmarshaller)</code></th>
<td class="colLast">
<div class="block">Declares a unmarshaller as available for reuse.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">get­Class</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hash­Code</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notify­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">to­String</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></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="context">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>context</h4>
<pre>protected final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBContext.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBContext</a> context</pre>
<div class="block">The JAXB context to use for creating marshaller and unmarshaller.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#createMarshaller()"><code>create­Marshaller()</code></a>,
<a href="#createUnmarshaller()"><code>create­Unmarshaller()</code></a></dd>
</dl>
</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="&lt;init&gt;(java.util.Map)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MarshallerPool</h4>
<pre>public&nbsp;MarshallerPool&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;?&gt;&nbsp;properties)
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<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>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>properties</code> - the properties to be given to the (un)marshaller, or <code>null</code> if none.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if the JAXB context can not be created.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(javax.xml.bind.JAXBContext,java.util.Map)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>MarshallerPool</h4>
<pre>public&nbsp;MarshallerPool&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBContext.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBContext</a>&nbsp;context,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;?&gt;&nbsp;properties)
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<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>
<dt><span class="paramLabel">Parameters:</span></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><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if the marshaller pool can not be created.</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="acquireMarshaller()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acquireMarshaller</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Marshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">Marshaller</a>&nbsp;acquireMarshaller()
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<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>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a marshaller configured for formatting OGC/ISO XML.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if an error occurred while creating and configuring a marshaller.</dd>
</dl>
</li>
</ul>
<a id="acquireUnmarshaller()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acquireUnmarshaller</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Unmarshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">Unmarshaller</a>&nbsp;acquireUnmarshaller()
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<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>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a unmarshaller configured for parsing OGC/ISO XML.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if an error occurred while creating and configuring the unmarshaller.</dd>
</dl>
</li>
</ul>
<a id="recycle(javax.xml.bind.Marshaller)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>recycle</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;recycle&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Marshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">Marshaller</a>&nbsp;marshaller)</pre>
<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.
<div class="section">Cautions</div>
<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>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>marshaller</code> - the marshaller to return to the pool.</dd>
</dl>
</li>
</ul>
<a id="recycle(javax.xml.bind.Unmarshaller)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>recycle</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;recycle&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Unmarshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">Unmarshaller</a>&nbsp;unmarshaller)</pre>
<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.
<div class="section">Cautions</div>
<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>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>unmarshaller</code> - the unmarshaller to return to the pool.</dd>
</dl>
</li>
</ul>
<a id="createMarshaller()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createMarshaller</h4>
<pre class="methodSignature">protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Marshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">Marshaller</a>&nbsp;createMarshaller()
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<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>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new marshaller configured for formatting OGC/ISO XML.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if an error occurred while creating and configuring the marshaller.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#context"><code>context</code></a>,
<a href="#acquireMarshaller()"><code>acquire­Marshaller()</code></a></dd>
</dl>
</li>
</ul>
<a id="createUnmarshaller()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>createUnmarshaller</h4>
<pre class="methodSignature">protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/Unmarshaller.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">Unmarshaller</a>&nbsp;createUnmarshaller()
throws <a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></pre>
<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>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new unmarshaller configured for parsing OGC/ISO XML.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXBException.html?is-external=true" title="class or interface in javax.xml.bind" class="externalLink">JAXBException</a></code> - if an error occurred while creating and configuring the unmarshaller.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#context"><code>context</code></a>,
<a href="#acquireUnmarshaller()"><code>acquire­Unmarshaller()</code></a></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/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">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;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:&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="subNavList">
<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>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2010&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>