blob: 3dc8e62f85366bf85bd2e4555f8ab8d4edb84716 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_80) on Wed Jun 07 15:10:53 EDT 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DeferredContentProvider (Jetty :: Project 9.2.22.v20170606 API)</title>
<meta name="date" content="2017-06-07">
<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="DeferredContentProvider (Jetty :: Project 9.2.22.v20170606 API)";
}
//-->
</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/DeferredContentProvider.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 class="aboutLanguage"><em><script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1149868-7']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/eclipse/jetty/client/util/BytesContentProvider.html" title="class in org.eclipse.jetty.client.util"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.Chunk.html" title="class in org.eclipse.jetty.client.util"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/eclipse/jetty/client/util/DeferredContentProvider.html" target="_top">Frames</a></li>
<li><a href="DeferredContentProvider.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:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&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>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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.eclipse.jetty.client.util</div>
<h2 title="Class DeferredContentProvider" class="title">Class DeferredContentProvider</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.eclipse.jetty.client.util.DeferredContentProvider</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&gt;, <a href="../../../../../org/eclipse/jetty/client/api/ContentProvider.html" title="interface in org.eclipse.jetty.client.api">ContentProvider</a>, <a href="../../../../../org/eclipse/jetty/client/AsyncContentProvider.html" title="interface in org.eclipse.jetty.client">AsyncContentProvider</a>, <a href="../../../../../org/eclipse/jetty/util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">DeferredContentProvider</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../../org/eclipse/jetty/client/AsyncContentProvider.html" title="interface in org.eclipse.jetty.client">AsyncContentProvider</a>, <a href="../../../../../org/eclipse/jetty/util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></pre>
<div class="block">A <a href="../../../../../org/eclipse/jetty/client/api/ContentProvider.html" title="interface in org.eclipse.jetty.client.api"><code>ContentProvider</code></a> that allows to add content after <a href="../../../../../org/eclipse/jetty/client/api/Request.html#send(org.eclipse.jetty.client.api.Response.CompleteListener)"><code>Request.send(Response.CompleteListener)</code></a>
has been called, therefore providing the request content at a later time.
<p />
<a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html" title="class in org.eclipse.jetty.client.util"><code>DeferredContentProvider</code></a> can only be used in conjunction with
<a href="../../../../../org/eclipse/jetty/client/api/Request.html#send(org.eclipse.jetty.client.api.Response.CompleteListener)"><code>Request.send(Response.CompleteListener)</code></a> (and not with its blocking counterpart <a href="../../../../../org/eclipse/jetty/client/api/Request.html#send()"><code>Request.send()</code></a>)
because it provides content asynchronously.
<p />
The deferred content is provided once and then fully consumed.
Invocations to the <a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#iterator()"><code>iterator()</code></a> method after the first will return an "empty" iterator
because the stream has been consumed on the first invocation.
However, it is possible for subclasses to override <a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#offer(java.nio.ByteBuffer)"><code>offer(ByteBuffer)</code></a> and <a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#close()"><code>close()</code></a> to copy
the content to another location (for example a file) and be able to support multiple invocations
of of <a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#iterator()"><code>iterator()</code></a> returning the iterator provided by this
class on the first invocation, and an iterator on the bytes copied to the other location
for subsequent invocations.
<p />
Typical usage of <a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html" title="class in org.eclipse.jetty.client.util"><code>DeferredContentProvider</code></a> is in asynchronous proxies, where HTTP headers arrive
separately from HTTP content chunks.
<p />
The deferred content must be provided through <a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#offer(java.nio.ByteBuffer)"><code>offer(ByteBuffer)</code></a>, which can be invoked multiple
times, and when all content has been provided it must be signaled with a call to <a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#close()"><code>close()</code></a>.
<p />
Example usage:
<pre>
HttpClient httpClient = ...;
// Use try-with-resources to autoclose DeferredContentProvider
try (DeferredContentProvider content = new DeferredContentProvider())
{
httpClient.newRequest("localhost", 8080)
.content(content)
.send(new Response.CompleteListener()
{
&#64Override
public void onComplete(Result result)
{
// Your logic here
}
});
// At a later time...
content.offer(ByteBuffer.wrap("some content".getBytes()));
}
</pre></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.Chunk.html" title="class in org.eclipse.jetty.client.util">DeferredContentProvider.Chunk</a></strong></code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="nested_classes_inherited_from_class_org.eclipse.jetty.client.AsyncContentProvider">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;org.eclipse.jetty.client.<a href="../../../../../org/eclipse/jetty/client/AsyncContentProvider.html" title="interface in org.eclipse.jetty.client">AsyncContentProvider</a></h3>
<code><a href="../../../../../org/eclipse/jetty/client/AsyncContentProvider.Listener.html" title="interface in org.eclipse.jetty.client">AsyncContentProvider.Listener</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="nested_classes_inherited_from_class_org.eclipse.jetty.client.api.ContentProvider">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;org.eclipse.jetty.client.api.<a href="../../../../../org/eclipse/jetty/client/api/ContentProvider.html" title="interface in org.eclipse.jetty.client.api">ContentProvider</a></h3>
<code><a href="../../../../../org/eclipse/jetty/client/api/ContentProvider.Typed.html" title="interface in org.eclipse.jetty.client.api">ContentProvider.Typed</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="nested_classes_inherited_from_class_org.eclipse.jetty.util.Callback">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;org.eclipse.jetty.util.<a href="../../../../../org/eclipse/jetty/util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a></h3>
<code><a href="../../../../../org/eclipse/jetty/util/Callback.Adapter.html" title="class in org.eclipse.jetty.util">Callback.Adapter</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#DeferredContentProvider(java.nio.ByteBuffer...)">DeferredContentProvider</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>...&nbsp;buffers)</code>
<div class="block">Creates a new <a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html" title="class in org.eclipse.jetty.client.util"><code>DeferredContentProvider</code></a> with the given initial content</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== 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">&nbsp;</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>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#close()">close</a></strong>()</code>
<div class="block">No more content will be added to this content provider
and notifies the listener that no more content is available.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#failed(java.lang.Throwable)">failed</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>&nbsp;failure)</code>
<div class="block">Callback invoked when the operation fails.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#flush()">flush</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#getLength()">getLength</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#isClosed()">isClosed</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#iterator()">iterator</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#offer(java.nio.ByteBuffer)">offer</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buffer)</code>
<div class="block">Adds the given content buffer to this content provider
and notifies the listener that content is available.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#offer(java.nio.ByteBuffer,%20org.eclipse.jetty.util.Callback)">offer</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buffer,
<a href="../../../../../org/eclipse/jetty/util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a>&nbsp;callback)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#setListener(org.eclipse.jetty.client.AsyncContentProvider.Listener)">setListener</a></strong>(<a href="../../../../../org/eclipse/jetty/client/AsyncContentProvider.Listener.html" title="interface in org.eclipse.jetty.client">AsyncContentProvider.Listener</a>&nbsp;listener)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html#succeeded()">succeeded</a></strong>()</code>
<div class="block">Callback invoked when the operation completes.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="DeferredContentProvider(java.nio.ByteBuffer...)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DeferredContentProvider</h4>
<pre>public&nbsp;DeferredContentProvider(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>...&nbsp;buffers)</pre>
<div class="block">Creates a new <a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.html" title="class in org.eclipse.jetty.client.util"><code>DeferredContentProvider</code></a> with the given initial content</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buffers</code> - the initial content</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setListener(org.eclipse.jetty.client.AsyncContentProvider.Listener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setListener</h4>
<pre>public&nbsp;void&nbsp;setListener(<a href="../../../../../org/eclipse/jetty/client/AsyncContentProvider.Listener.html" title="interface in org.eclipse.jetty.client">AsyncContentProvider.Listener</a>&nbsp;listener)</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/client/AsyncContentProvider.html#setListener(org.eclipse.jetty.client.AsyncContentProvider.Listener)">setListener</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/eclipse/jetty/client/AsyncContentProvider.html" title="interface in org.eclipse.jetty.client">AsyncContentProvider</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>listener</code> - the listener to be notified of content availability</dd></dl>
</li>
</ul>
<a name="getLength()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLength</h4>
<pre>public&nbsp;long&nbsp;getLength()</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/client/api/ContentProvider.html#getLength()">getLength</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/eclipse/jetty/client/api/ContentProvider.html" title="interface in org.eclipse.jetty.client.api">ContentProvider</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the content length, if known, or -1 if the content length is unknown</dd></dl>
</li>
</ul>
<a name="offer(java.nio.ByteBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>offer</h4>
<pre>public&nbsp;boolean&nbsp;offer(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buffer)</pre>
<div class="block">Adds the given content buffer to this content provider
and notifies the listener that content is available.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buffer</code> - the content to add</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the content was added, false otherwise</dd></dl>
</li>
</ul>
<a name="offer(java.nio.ByteBuffer, org.eclipse.jetty.util.Callback)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>offer</h4>
<pre>public&nbsp;boolean&nbsp;offer(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buffer,
<a href="../../../../../org/eclipse/jetty/util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a>&nbsp;callback)</pre>
</li>
</ul>
<a name="flush()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flush</h4>
<pre>public&nbsp;void&nbsp;flush()
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl>
</li>
</ul>
<a name="close()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()</pre>
<div class="block">No more content will be added to this content provider
and notifies the listener that no more content is available.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true#close()" title="class or interface in java.io">close</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true#close()" title="class or interface in java.lang">close</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd>
</dl>
</li>
</ul>
<a name="isClosed()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isClosed</h4>
<pre>public&nbsp;boolean&nbsp;isClosed()</pre>
</li>
</ul>
<a name="succeeded()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>succeeded</h4>
<pre>public&nbsp;void&nbsp;succeeded()</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/Callback.html#succeeded()">Callback</a></code></strong></div>
<div class="block"><p>Callback invoked when the operation completes.</p></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/Callback.html#succeeded()">succeeded</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a></code></dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/eclipse/jetty/util/Callback.html#failed(java.lang.Throwable)"><code>Callback.failed(Throwable)</code></a></dd></dl>
</li>
</ul>
<a name="failed(java.lang.Throwable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>failed</h4>
<pre>public&nbsp;void&nbsp;failed(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>&nbsp;failure)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/Callback.html#failed(java.lang.Throwable)">Callback</a></code></strong></div>
<div class="block"><p>Callback invoked when the operation fails.</p></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/Callback.html#failed(java.lang.Throwable)">failed</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/Callback.html" title="interface in org.eclipse.jetty.util">Callback</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>failure</code> - the reason for the operation failure</dd></dl>
</li>
</ul>
<a name="iterator()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>iterator</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&gt;&nbsp;iterator()</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true#iterator()" title="class or interface in java.lang">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&gt;</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/DeferredContentProvider.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 class="aboutLanguage"><em><script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1149868-7']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/eclipse/jetty/client/util/BytesContentProvider.html" title="class in org.eclipse.jetty.client.util"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/eclipse/jetty/client/util/DeferredContentProvider.Chunk.html" title="class in org.eclipse.jetty.client.util"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/eclipse/jetty/client/util/DeferredContentProvider.html" target="_top">Frames</a></li>
<li><a href="DeferredContentProvider.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:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&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>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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 &#169; 1995-2017 <a href="http://webtide.com">Webtide</a>. All Rights Reserved.</small></p>
</body>
</html>