blob: 32e2c62fb706567fe13fc7997c357decd167b62a [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.9.1) on Mon Nov 23 11:46:34 CST 2020 -->
<title>AfterContentTransformer (Jetty :: Project 9.4.35.v20201120 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2020-11-23">
<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.5.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="AfterContentTransformer (Jetty :: Project 9.4.35.v20201120 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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/AfterContentTransformer.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><a href="#nested.class.summary">Nested</a>&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>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 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.eclipse.jetty.proxy</a></div>
<h2 title="Class AfterContentTransformer" class="title">Class AfterContentTransformer</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.eclipse.jetty.proxy.AfterContentTransformer</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="AsyncMiddleManServlet.ContentTransformer.html" title="interface in org.eclipse.jetty.proxy">AsyncMiddleManServlet.ContentTransformer</a></code>, <code><a href="../util/component/Destroyable.html" title="interface in org.eclipse.jetty.util.component">Destroyable</a></code></dd>
</dl>
<hr>
<pre>public abstract class <span class="typeNameLabel">AfterContentTransformer</span>
extends java.lang.Object
implements <a href="AsyncMiddleManServlet.ContentTransformer.html" title="interface in org.eclipse.jetty.proxy">AsyncMiddleManServlet.ContentTransformer</a>, <a href="../util/component/Destroyable.html" title="interface in org.eclipse.jetty.util.component">Destroyable</a></pre>
<div class="block"><p>A specialized transformer for <a href="AsyncMiddleManServlet.html" title="class in org.eclipse.jetty.proxy"><code>AsyncMiddleManServlet</code></a> that performs
the transformation when the whole content has been received.</p>
<p>The content is buffered in memory up to a configurable <a href="#getMaxInputBufferSize()"><code>maximum size</code></a>,
after which it is overflown to a file on disk. The overflow file is saved
in the <a href="#getOverflowDirectory()"><code>overflow directory</code></a> as a
<code>temporary file</code>
with a name starting with the <a href="#getInputFilePrefix()"><code>input prefix</code></a>
and default suffix.</p>
<p>Application must implement the <a href="#transform(org.eclipse.jetty.proxy.AfterContentTransformer.Source,org.eclipse.jetty.proxy.AfterContentTransformer.Sink)"><code>transformation method</code></a>
to transform the content.</p>
<p>The transformed content is buffered in memory up to a configurable <a href="#getMaxOutputBufferSize()"><code>maximum size</code></a>
after which it is overflown to a file on disk. The overflow file is saved
in the <a href="#getOverflowDirectory()"><code>overflow directory</code></a> as a
<code>temporary file</code>
with a name starting with the <a href="#getOutputFilePrefix()"><code>getOutputFilePrefix()</code></a> output prefix}
and default suffix.</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AfterContentTransformer.Sink.html" title="class in org.eclipse.jetty.proxy">AfterContentTransformer.Sink</a></span></code></th>
<td class="colLast">
<div class="block">The target to where the transformed content is written after the transformation.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AfterContentTransformer.Source.html" title="class in org.eclipse.jetty.proxy">AfterContentTransformer.Source</a></span></code></th>
<td class="colLast">
<div class="block">The source from where the original content is read to be transformed.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.eclipse.jetty.proxy.AsyncMiddleManServlet.ContentTransformer">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;org.eclipse.jetty.proxy.<a href="AsyncMiddleManServlet.ContentTransformer.html" title="interface in org.eclipse.jetty.proxy">AsyncMiddleManServlet.ContentTransformer</a></h3>
<code><a href="AsyncMiddleManServlet.ContentTransformer.html#IDENTITY">IDENTITY</a></code></li>
</ul>
</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()">AfterContentTransformer</a></span>()</code></th>
<td class="colLast">&nbsp;</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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#destroy()">destroy</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInputFilePrefix()">getInputFilePrefix</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxInputBufferSize()">getMaxInputBufferSize</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the maximum input buffer size, after which the input is overflown to disk.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxOutputBufferSize()">getMaxOutputBufferSize</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the maximum output buffer size, after which the output is overflown to disk.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getOutputFilePrefix()">getOutputFilePrefix</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.nio.file.Path</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getOverflowDirectory()">getOverflowDirectory</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the directory where input and output are overflown to
temporary files if they exceed, respectively, the
<a href="#getMaxInputBufferSize()"><code>max input size</code></a> or the
<a href="#getMaxOutputBufferSize()"><code>max output size</code></a>.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setInputFilePrefix(java.lang.String)">setInputFilePrefix</a></span>&#8203;(java.lang.String&nbsp;inputFilePrefix)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMaxInputBufferSize(long)">setMaxInputBufferSize</a></span>&#8203;(long&nbsp;maxInputBufferSize)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMaxOutputBufferSize(long)">setMaxOutputBufferSize</a></span>&#8203;(long&nbsp;maxOutputBufferSize)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setOutputFilePrefix(java.lang.String)">setOutputFilePrefix</a></span>&#8203;(java.lang.String&nbsp;outputFilePrefix)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setOverflowDirectory(java.nio.file.Path)">setOverflowDirectory</a></span>&#8203;(java.nio.file.Path&nbsp;overflowDirectory)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#transform(java.nio.ByteBuffer,boolean,java.util.List)">transform</a></span>&#8203;(java.nio.ByteBuffer&nbsp;input,
boolean&nbsp;finished,
java.util.List&lt;java.nio.ByteBuffer&gt;&nbsp;output)</code></th>
<td class="colLast">
<div class="block">Transforms the given input byte buffers into (possibly multiple) byte buffers.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>abstract boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#transform(org.eclipse.jetty.proxy.AfterContentTransformer.Source,org.eclipse.jetty.proxy.AfterContentTransformer.Sink)">transform</a></span>&#8203;(<a href="AfterContentTransformer.Source.html" title="class in org.eclipse.jetty.proxy">AfterContentTransformer.Source</a>&nbsp;source,
<a href="AfterContentTransformer.Sink.html" title="class in org.eclipse.jetty.proxy">AfterContentTransformer.Sink</a>&nbsp;sink)</code></th>
<td class="colLast">
<div class="block">Transforms the original content read from the <code>source</code> into
transformed content written to the <code>sink</code>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= 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;()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>AfterContentTransformer</h4>
<pre>public&nbsp;AfterContentTransformer()</pre>
</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="getOverflowDirectory()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOverflowDirectory</h4>
<pre class="methodSignature">public&nbsp;java.nio.file.Path&nbsp;getOverflowDirectory()</pre>
<div class="block"><p>Returns the directory where input and output are overflown to
temporary files if they exceed, respectively, the
<a href="#getMaxInputBufferSize()"><code>max input size</code></a> or the
<a href="#getMaxOutputBufferSize()"><code>max output size</code></a>.</p>
<p>Defaults to the directory pointed by the <code>java.io.tmpdir</code>
system property.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the overflow directory path</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#setOverflowDirectory(java.nio.file.Path)"><code>setOverflowDirectory(Path)</code></a></dd>
</dl>
</li>
</ul>
<a id="setOverflowDirectory(java.nio.file.Path)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOverflowDirectory</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setOverflowDirectory&#8203;(java.nio.file.Path&nbsp;overflowDirectory)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>overflowDirectory</code> - the overflow directory path</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#getOverflowDirectory()"><code>getOverflowDirectory()</code></a></dd>
</dl>
</li>
</ul>
<a id="getInputFilePrefix()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInputFilePrefix</h4>
<pre class="methodSignature">public&nbsp;java.lang.String&nbsp;getInputFilePrefix()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the prefix of the input overflow temporary files</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#setInputFilePrefix(java.lang.String)"><code>setInputFilePrefix(String)</code></a></dd>
</dl>
</li>
</ul>
<a id="setInputFilePrefix(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setInputFilePrefix</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setInputFilePrefix&#8203;(java.lang.String&nbsp;inputFilePrefix)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>inputFilePrefix</code> - the prefix of the input overflow temporary files</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#getInputFilePrefix()"><code>getInputFilePrefix()</code></a></dd>
</dl>
</li>
</ul>
<a id="getMaxInputBufferSize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxInputBufferSize</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getMaxInputBufferSize()</pre>
<div class="block"><p>Returns the maximum input buffer size, after which the input is overflown to disk.</p>
<p>Defaults to 1 MiB, i.e. 1048576 bytes.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the max input buffer size</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#setMaxInputBufferSize(long)"><code>setMaxInputBufferSize(long)</code></a></dd>
</dl>
</li>
</ul>
<a id="setMaxInputBufferSize(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxInputBufferSize</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setMaxInputBufferSize&#8203;(long&nbsp;maxInputBufferSize)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxInputBufferSize</code> - the max input buffer size</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#getMaxInputBufferSize()"><code>getMaxInputBufferSize()</code></a></dd>
</dl>
</li>
</ul>
<a id="getOutputFilePrefix()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOutputFilePrefix</h4>
<pre class="methodSignature">public&nbsp;java.lang.String&nbsp;getOutputFilePrefix()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the prefix of the output overflow temporary files</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#setOutputFilePrefix(java.lang.String)"><code>setOutputFilePrefix(String)</code></a></dd>
</dl>
</li>
</ul>
<a id="setOutputFilePrefix(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOutputFilePrefix</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setOutputFilePrefix&#8203;(java.lang.String&nbsp;outputFilePrefix)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>outputFilePrefix</code> - the prefix of the output overflow temporary files</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#getOutputFilePrefix()"><code>getOutputFilePrefix()</code></a></dd>
</dl>
</li>
</ul>
<a id="getMaxOutputBufferSize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxOutputBufferSize</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getMaxOutputBufferSize()</pre>
<div class="block"><p>Returns the maximum output buffer size, after which the output is overflown to disk.</p>
<p>Defaults to 1 MiB, i.e. 1048576 bytes.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the max output buffer size</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#setMaxOutputBufferSize(long)"><code>setMaxOutputBufferSize(long)</code></a></dd>
</dl>
</li>
</ul>
<a id="setMaxOutputBufferSize(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxOutputBufferSize</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setMaxOutputBufferSize&#8203;(long&nbsp;maxOutputBufferSize)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxOutputBufferSize</code> - the max output buffer size</dd>
</dl>
</li>
</ul>
<a id="transform(java.nio.ByteBuffer,boolean,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>transform</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;transform&#8203;(java.nio.ByteBuffer&nbsp;input,
boolean&nbsp;finished,
java.util.List&lt;java.nio.ByteBuffer&gt;&nbsp;output)
throws java.io.IOException</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="AsyncMiddleManServlet.ContentTransformer.html#transform(java.nio.ByteBuffer,boolean,java.util.List)">AsyncMiddleManServlet.ContentTransformer</a></code></span></div>
<div class="block"><p>Transforms the given input byte buffers into (possibly multiple) byte buffers.</p>
<p>The transformation must happen synchronously in the context of a call
to this method (it is not supported to perform the transformation in another
thread spawned during the call to this method).
The transformation may happen or not, depending on the transformer implementation.
For example, a buffering transformer may buffer the input aside, and only
perform the transformation when the whole input is provided (by looking at the
<code>finished</code> flag).</p>
<p>The input buffer will be cleared and reused after the call to this method.
Implementations that want to buffer aside the input (or part of it) must copy
the input bytes that they want to buffer.</p>
<p>Typical implementations:</p>
<pre>
// Identity transformation (no transformation, the input is copied to the output)
public void transform(ByteBuffer input, boolean finished, List&lt;ByteBuffer&gt; output)
{
output.add(input);
}
// Discard transformation (all input is discarded)
public void transform(ByteBuffer input, boolean finished, List&lt;ByteBuffer&gt; output)
{
// Empty
}
// Buffering identity transformation (all input is buffered aside until it is finished)
public void transform(ByteBuffer input, boolean finished, List&lt;ByteBuffer&gt; output)
{
ByteBuffer copy = ByteBuffer.allocate(input.remaining());
copy.put(input).flip();
store(copy);
if (finished)
{
List&lt;ByteBuffer&gt; copies = retrieve();
output.addAll(copies);
}
}
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="AsyncMiddleManServlet.ContentTransformer.html#transform(java.nio.ByteBuffer,boolean,java.util.List)">transform</a></code>&nbsp;in interface&nbsp;<code><a href="AsyncMiddleManServlet.ContentTransformer.html" title="interface in org.eclipse.jetty.proxy">AsyncMiddleManServlet.ContentTransformer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - the input content to transform (may be of length zero)</dd>
<dd><code>finished</code> - whether the input content is finished or more will come</dd>
<dd><code>output</code> - where to put the transformed output content</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - in case of transformation failures</dd>
</dl>
</li>
</ul>
<a id="transform(org.eclipse.jetty.proxy.AfterContentTransformer.Source,org.eclipse.jetty.proxy.AfterContentTransformer.Sink)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>transform</h4>
<pre class="methodSignature">public abstract&nbsp;boolean&nbsp;transform&#8203;(<a href="AfterContentTransformer.Source.html" title="class in org.eclipse.jetty.proxy">AfterContentTransformer.Source</a>&nbsp;source,
<a href="AfterContentTransformer.Sink.html" title="class in org.eclipse.jetty.proxy">AfterContentTransformer.Sink</a>&nbsp;sink)
throws java.io.IOException</pre>
<div class="block"><p>Transforms the original content read from the <code>source</code> into
transformed content written to the <code>sink</code>.</p>
<p>The transformation must happen synchronously in the context of a call
to this method (it is not supported to perform the transformation in another
thread spawned during the call to this method).</p>
<p>Differently from <a href="#transform(java.nio.ByteBuffer,boolean,java.util.List)"><code>transform(ByteBuffer, boolean, List)</code></a>, this
method is invoked only when the whole content is available, and offers
a blocking API via the InputStream and OutputStream that can be obtained
from <a href="AfterContentTransformer.Source.html" title="class in org.eclipse.jetty.proxy"><code>AfterContentTransformer.Source</code></a> and <a href="AfterContentTransformer.Sink.html" title="class in org.eclipse.jetty.proxy"><code>AfterContentTransformer.Sink</code></a> respectively.</p>
<p>Implementations may read the source, inspect the input bytes and decide
that no transformation is necessary, and therefore the source must be copied
unchanged to the sink. In such case, the implementation must return false to
indicate that it wishes to just pipe the bytes from the source to the sink.</p>
<p>Typical implementations:</p>
<pre>
// Identity transformation (no transformation, the input is copied to the output)
public boolean transform(Source source, Sink sink)
{
org.eclipse.jetty.util.IO.copy(source.getInputStream(), sink.getOutputStream());
return true;
}
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>source</code> - where the original content is read</dd>
<dd><code>sink</code> - where the transformed content is written</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the transformation happened and the transformed bytes have
been written to the sink, false if no transformation happened and the source
must be copied to the sink.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if the transformation fails</dd>
</dl>
</li>
</ul>
<a id="destroy()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>destroy</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;destroy()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../util/component/Destroyable.html#destroy()">destroy</a></code>&nbsp;in interface&nbsp;<code><a href="../util/component/Destroyable.html" title="interface in org.eclipse.jetty.util.component">Destroyable</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/AfterContentTransformer.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><a href="#nested.class.summary">Nested</a>&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>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 id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 1995&#x2013;2020 <a href="https://webtide.com">Webtide</a>. All rights reserved.</small></p>
</footer>
</body>
</html>