| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>DataSourceMessageBuilder (Apache Axis2)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="DataSourceMessageBuilder (Apache Axis2)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.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"> |
| <li><a href="../../../../org/apache/axis2/format/BinaryFormatter.html" title="class in org.apache.axis2.format"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/axis2/format/ManagedDataSource.html" title="interface in org.apache.axis2.format"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/axis2/format/DataSourceMessageBuilder.html" target="_top">Frames</a></li> |
| <li><a href="DataSourceMessageBuilder.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></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> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.axis2.format</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><a href="../../../../org/apache/axis2/builder/Builder.html" title="interface in org.apache.axis2.builder">Builder</a></dd> |
| </dl> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../../../org/apache/axis2/format/BinaryBuilder.html" title="class in org.apache.axis2.format">BinaryBuilder</a>, <a href="../../../../org/apache/axis2/format/PlainTextBuilder.html" title="class in org.apache.axis2.format">PlainTextBuilder</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <span class="strong">DataSourceMessageBuilder</span> |
| extends <a href="../../../../org/apache/axis2/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="http://docs.oracle.com/javaee/5/api/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation"><code>DataSource</code></a> objects. |
| This interface can be optionally implemented by <a href="../../../../org/apache/axis2/builder/Builder.html" title="interface in org.apache.axis2.builder"><code>Builder</code></a> |
| implementations that support building messages from <a href="http://docs.oracle.com/javaee/5/api/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation"><code>DataSource</code></a> objects. |
| Since by definition the data from a <a href="http://docs.oracle.com/javaee/5/api/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation"><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="../../../../org/apache/axis2/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="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMElement.html?is-external=true" title="class or interface in org.apache.axiom.om"><code>OMElement</code></a>, e.g. by adding to the tree an <a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMText.html?is-external=true" title="class or interface in org.apache.axiom.om"><code>OMText</code></a> |
| or <a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMDataSource.html?is-external=true" title="class or interface in org.apache.axiom.om"><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="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMElement.html?is-external=true" title="class or interface in org.apache.axiom.om"><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="../../../../org/apache/axis2/format/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="../../../../org/apache/axis2/format/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 =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMElement.html?is-external=true" title="class or interface in org.apache.axiom.om">OMElement</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/axis2/format/DataSourceMessageBuilder.html#processDocument(javax.activation.DataSource, java.lang.String, org.apache.axis2.context.MessageContext)">processDocument</a></strong>(<a href="http://docs.oracle.com/javaee/5/api/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation">DataSource</a> dataSource, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> contentType, |
| <a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a> messageContext)</code> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_org.apache.axis2.builder.Builder"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.axis2.builder.<a href="../../../../org/apache/axis2/builder/Builder.html" title="interface in org.apache.axis2.builder">Builder</a></h3> |
| <code><a href="../../../../org/apache/axis2/builder/Builder.html#processDocument(java.io.InputStream, java.lang.String, org.apache.axis2.context.MessageContext)">processDocument</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="processDocument(javax.activation.DataSource, java.lang.String, org.apache.axis2.context.MessageContext)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>processDocument</h4> |
| <pre><a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMElement.html?is-external=true" title="class or interface in org.apache.axiom.om">OMElement</a> processDocument(<a href="http://docs.oracle.com/javaee/5/api/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation">DataSource</a> dataSource, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> contentType, |
| <a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a> messageContext) |
| throws <a href="../../../../org/apache/axis2/AxisFault.html" title="class in org.apache.axis2">AxisFault</a></pre> |
| <dl><dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/axis2/AxisFault.html" title="class in org.apache.axis2">AxisFault</a></code></dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.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"> |
| <li><a href="../../../../org/apache/axis2/format/BinaryFormatter.html" title="class in org.apache.axis2.format"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/axis2/format/ManagedDataSource.html" title="interface in org.apache.axis2.format"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/axis2/format/DataSourceMessageBuilder.html" target="_top">Frames</a></li> |
| <li><a href="DataSourceMessageBuilder.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p> |
| </body> |
| </html> |