blob: 885ebda38d2dab4d32a6497863c67d20b781f6bc [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>DataSourceMessageBuilder (Apache Axis2)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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.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="DataSourceMessageBuilder (Apache Axis2)";
}
}
catch(err) {
}
//-->
var data = {"i0":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
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/DataSourceMessageBuilder.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>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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.axis2.format</a></div>
<h2 title="Interface DataSourceMessageBuilder" class="title">Interface DataSourceMessageBuilder</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><code><a href="../builder/Builder.html" title="interface in org.apache.axis2.builder">Builder</a></code></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="BinaryBuilder.html" title="class in org.apache.axis2.format">BinaryBuilder</a></code>, <code><a href="PlainTextBuilder.html" title="class in org.apache.axis2.format">PlainTextBuilder</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">DataSourceMessageBuilder</span>
extends <a href="../builder/Builder.html" title="interface in org.apache.axis2.builder">Builder</a></pre>
<div class="block">Message builder able to build messages from <a href="https://docs.oracle.com/javase/7/docs/api/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation" class="externalLink"><code>DataSource</code></a> objects.
This interface can be optionally implemented by <a href="../builder/Builder.html" title="interface in org.apache.axis2.builder"><code>Builder</code></a>
implementations that support building messages from <a href="https://docs.oracle.com/javase/7/docs/api/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation" class="externalLink"><code>DataSource</code></a> objects.
Since by definition the data from a <a href="https://docs.oracle.com/javase/7/docs/api/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation" class="externalLink"><code>DataSource</code></a> can be read multiple
times, this interface can be used by message builders to avoid storing the
message content in memory.
<p>
If a message builder implements this interface and the transport is able to
provide the message payload as a data source, then the method defined by this
interface should be preferred over the method defined by <a href="../builder/Builder.html" title="interface in org.apache.axis2.builder"><code>Builder</code></a>.
<p>
Implementing this interface helps optimizing message processing with transports
that use messaging providers that store messages in memory or on the file system.
Examples are JMS and VFS.
<p>
The builder will typically expose the data source directly or indirectly through
the returned <a href="https://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMElement.html?is-external=true" title="class or interface in org.apache.axiom.om" class="externalLink"><code>OMElement</code></a>, e.g. by adding to the tree an <a href="https://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMText.html?is-external=true" title="class or interface in org.apache.axiom.om" class="externalLink"><code>OMText</code></a>
or <a href="https://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMDataSource.html?is-external=true" title="class or interface in org.apache.axiom.om" class="externalLink"><code>OMDataSource</code></a> node referencing the data source.
This means that the builder will not be able to guarantee that all streams requested
from the data source are properly closed. Note that code accessing the returned
<a href="https://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMElement.html?is-external=true" title="class or interface in org.apache.axiom.om" class="externalLink"><code>OMElement</code></a> can't be expected to take care of this since in many cases the fact
that a data source is being used is completely transparent to that code.
It is therefore the responsibility of the transport to make sure that all resources linked to
the data source itself as well as any open stream requested from that data source are properly
released after the message has been processed. Depending on the type of transport, there are
three possible cases:
<ol>
<li>All resources allocated to the data source or streams requested from it are
memory based. In that case the garbage collector will take care of freeing
these resources and the transport should simply pass the data source object
to the builder.</li>
<li>There are operation system resources linked to the data source and open
streams will become invalid when these resources are freed, i.e.
it is not required that all streams be closed explicitly.
In this case the transport only needs to take care to properly dispose of
the data source after the message has been processed by the Axis2 engine.</li>
<li>Requesting a stream from the data source allocates operation system resources
(e.g. a network connection) that remain linked to the stream, i.e. all streams requested
from the data source must be closed properly. In that case the transport should use
<a href="ManagedDataSourceFactory.html#create(javax.activation.DataSource)"><code>ManagedDataSourceFactory.create(DataSource)</code></a> to wrap the original data source
before passing it to the builder. After the message has been processed it should
then call <a href="ManagedDataSource.html#destroy()"><code>ManagedDataSource.destroy()</code></a> on the wrapper to close all remaining
open streams.</li>
</ol></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMElement.html?is-external=true" title="class or interface in org.apache.axiom.om" class="externalLink">OMElement</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#processDocument(javax.activation.DataSource,java.lang.String,org.apache.axis2.context.MessageContext)">processDocument</a></span>&#8203;(<a href="https://docs.oracle.com/javase/7/docs/api/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation" class="externalLink">DataSource</a>&nbsp;dataSource,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;contentType,
<a href="../context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a>&nbsp;messageContext)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.axis2.builder.Builder">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.axis2.builder.<a href="../builder/Builder.html" title="interface in org.apache.axis2.builder">Builder</a></h3>
<code><a href="../builder/Builder.html#processDocument(java.io.InputStream,java.lang.String,org.apache.axis2.context.MessageContext)">processDocument</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="processDocument(javax.activation.DataSource,java.lang.String,org.apache.axis2.context.MessageContext)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>processDocument</h4>
<pre class="methodSignature"><a href="https://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMElement.html?is-external=true" title="class or interface in org.apache.axiom.om" class="externalLink">OMElement</a>&nbsp;processDocument&#8203;(<a href="https://docs.oracle.com/javase/7/docs/api/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation" class="externalLink">DataSource</a>&nbsp;dataSource,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;contentType,
<a href="../context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a>&nbsp;messageContext)
throws <a href="../AxisFault.html" title="class in org.apache.axis2">AxisFault</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../AxisFault.html" title="class in org.apache.axis2">AxisFault</a></code></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/DataSourceMessageBuilder.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>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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 &copy; <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p>
</footer>
</body>
</html>