| <!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 (1.8.0_60) on Sun Oct 23 21:34:07 CEST 2016 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>CumulativeProtocolDecoder (Apache MINA 2.0.16 API)</title> |
| <meta name="date" content="2016-10-23"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="CumulativeProtocolDecoder (Apache MINA 2.0.16 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":6,"i3":10}; |
| 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"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <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/CumulativeProtocolDecoder.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/mina/filter/codec/AbstractProtocolEncoderOutput.html" title="class in org.apache.mina.filter.codec"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/mina/filter/codec/ProtocolCodecException.html" title="class in org.apache.mina.filter.codec"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/mina/filter/codec/CumulativeProtocolDecoder.html" target="_top">Frames</a></li> |
| <li><a href="CumulativeProtocolDecoder.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><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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.mina.filter.codec</div> |
| <h2 title="Class CumulativeProtocolDecoder" class="title">Class CumulativeProtocolDecoder</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><a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoderAdapter.html" title="class in org.apache.mina.filter.codec">org.apache.mina.filter.codec.ProtocolDecoderAdapter</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.mina.filter.codec.CumulativeProtocolDecoder</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoder.html" title="interface in org.apache.mina.filter.codec">ProtocolDecoder</a></dd> |
| </dl> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><a href="../../../../../org/apache/mina/filter/codec/demux/DemuxingProtocolDecoder.html" title="class in org.apache.mina.filter.codec.demux">DemuxingProtocolDecoder</a>, <a href="../../../../../org/apache/mina/example/imagine/step1/codec/ImageRequestDecoder.html" title="class in org.apache.mina.example.imagine.step1.codec">ImageRequestDecoder</a>, <a href="../../../../../org/apache/mina/example/imagine/step1/codec/ImageResponseDecoder.html" title="class in org.apache.mina.example.imagine.step1.codec">ImageResponseDecoder</a>, <a href="../../../../../org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.html" title="class in org.apache.mina.filter.codec.serialization">ObjectSerializationDecoder</a>, <a href="../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringDecoder.html" title="class in org.apache.mina.filter.codec.prefixedstring">PrefixedStringDecoder</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public abstract class <a href="../../../../../src-html/org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#line.101">CumulativeProtocolDecoder</a> |
| extends <a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoderAdapter.html" title="class in org.apache.mina.filter.codec">ProtocolDecoderAdapter</a></pre> |
| <div class="block">A <a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoder.html" title="interface in org.apache.mina.filter.codec"><code>ProtocolDecoder</code></a> that cumulates the content of received buffers to a |
| <em>cumulative buffer</em> to help users implement decoders. |
| <p> |
| If the received <a href="../../../../../org/apache/mina/core/buffer/IoBuffer.html" title="class in org.apache.mina.core.buffer"><code>IoBuffer</code></a> is only a part of a message. decoders should |
| cumulate received buffers to make a message complete or to postpone decoding |
| until more buffers arrive. |
| <p> |
| Here is an example decoder that decodes CRLF terminated lines into |
| <code>Command</code> objects: |
| |
| <pre> |
| public class CrLfTerminatedCommandLineDecoder extends CumulativeProtocolDecoder { |
| |
| private Command parseCommand(IoBuffer in) { |
| // Convert the bytes in the specified buffer to a |
| // Command object. |
| ... |
| } |
| |
| protected boolean doDecode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) throws Exception { |
| |
| // Remember the initial position. |
| int start = in.position(); |
| |
| // Now find the first CRLF in the buffer. |
| byte previous = 0; |
| while (in.hasRemaining()) { |
| byte current = in.get(); |
| |
| if (previous == '\r' && current == '\n') { |
| // Remember the current position and limit. |
| int position = in.position(); |
| int limit = in.limit(); |
| try { |
| in.position(start); |
| in.limit(position); |
| // The bytes between in.position() and in.limit() |
| // now contain a full CRLF terminated line. |
| out.write(parseCommand(in.slice())); |
| } finally { |
| // Set the position to point right after the |
| // detected line and set the limit to the old |
| // one. |
| in.position(position); |
| in.limit(limit); |
| } |
| // Decoded one line; CumulativeProtocolDecoder will |
| // call me again until I return false. So just |
| // return true until there are no more lines in the |
| // buffer. |
| return true; |
| } |
| |
| previous = current; |
| } |
| |
| // Could not find CRLF in the buffer. Reset the initial |
| // position to the one we recorded above. |
| in.position(start); |
| |
| return false; |
| } |
| } |
| </pre> |
| <p> |
| Please note that this decoder simply forward the call to |
| <a href="../../../../../org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#doDecode-org.apache.mina.core.session.IoSession-org.apache.mina.core.buffer.IoBuffer-org.apache.mina.filter.codec.ProtocolDecoderOutput-"><code>doDecode(IoSession, IoBuffer, ProtocolDecoderOutput)</code></a> if the |
| underlying transport doesn't have a packet fragmentation. Whether the |
| transport has fragmentation or not is determined by querying |
| <a href="../../../../../org/apache/mina/core/service/TransportMetadata.html" title="interface in org.apache.mina.core.service"><code>TransportMetadata</code></a>.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Author:</span></dt> |
| <dd><a href="http://mina.apache.org">Apache MINA Project</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier</th> |
| <th class="colLast" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#CumulativeProtocolDecoder--">CumulativeProtocolDecoder</a></span>()</code> |
| <div class="block">Creates a new instance.</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="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#decode-org.apache.mina.core.session.IoSession-org.apache.mina.core.buffer.IoBuffer-org.apache.mina.filter.codec.ProtocolDecoderOutput-">decode</a></span>(<a href="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</a> session, |
| <a href="../../../../../org/apache/mina/core/buffer/IoBuffer.html" title="class in org.apache.mina.core.buffer">IoBuffer</a> in, |
| <a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoderOutput.html" title="interface in org.apache.mina.filter.codec">ProtocolDecoderOutput</a> out)</code> |
| <div class="block">Cumulates content of <tt>in</tt> into internal buffer and forwards |
| decoding request to |
| <a href="../../../../../org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#doDecode-org.apache.mina.core.session.IoSession-org.apache.mina.core.buffer.IoBuffer-org.apache.mina.filter.codec.ProtocolDecoderOutput-"><code>doDecode(IoSession, IoBuffer, ProtocolDecoderOutput)</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#dispose-org.apache.mina.core.session.IoSession-">dispose</a></span>(<a href="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</a> session)</code> |
| <div class="block">Releases the cumulative buffer used by the specified <tt>session</tt>.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>protected abstract boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#doDecode-org.apache.mina.core.session.IoSession-org.apache.mina.core.buffer.IoBuffer-org.apache.mina.filter.codec.ProtocolDecoderOutput-">doDecode</a></span>(<a href="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</a> session, |
| <a href="../../../../../org/apache/mina/core/buffer/IoBuffer.html" title="class in org.apache.mina.core.buffer">IoBuffer</a> in, |
| <a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoderOutput.html" title="interface in org.apache.mina.filter.codec">ProtocolDecoderOutput</a> out)</code> |
| <div class="block">Implement this method to consume the specified cumulative buffer and |
| decode its content into message(s).</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#setTransportMetadataFragmentation-boolean-">setTransportMetadataFragmentation</a></span>(boolean transportMetadataFragmentation)</code> |
| <div class="block">Let the user change the way we handle fragmentation.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.mina.filter.codec.ProtocolDecoderAdapter"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.mina.filter.codec.<a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoderAdapter.html" title="class in org.apache.mina.filter.codec">ProtocolDecoderAdapter</a></h3> |
| <code><a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoderAdapter.html#finishDecode-org.apache.mina.core.session.IoSession-org.apache.mina.filter.codec.ProtocolDecoderOutput-">finishDecode</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class 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-int-" 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="CumulativeProtocolDecoder--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>CumulativeProtocolDecoder</h4> |
| <pre>protected <a href="../../../../../src-html/org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#line.113">CumulativeProtocolDecoder</a>()</pre> |
| <div class="block">Creates a new instance.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="decode-org.apache.mina.core.session.IoSession-org.apache.mina.core.buffer.IoBuffer-org.apache.mina.filter.codec.ProtocolDecoderOutput-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>decode</h4> |
| <pre>public void <a href="../../../../../src-html/org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#line.128">decode</a>(<a href="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</a> session, |
| <a href="../../../../../org/apache/mina/core/buffer/IoBuffer.html" title="class in org.apache.mina.core.buffer">IoBuffer</a> in, |
| <a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoderOutput.html" title="interface in org.apache.mina.filter.codec">ProtocolDecoderOutput</a> out) |
| throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <div class="block">Cumulates content of <tt>in</tt> into internal buffer and forwards |
| decoding request to |
| <a href="../../../../../org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#doDecode-org.apache.mina.core.session.IoSession-org.apache.mina.core.buffer.IoBuffer-org.apache.mina.filter.codec.ProtocolDecoderOutput-"><code>doDecode(IoSession, IoBuffer, ProtocolDecoderOutput)</code></a>. |
| <tt>doDecode()</tt> is invoked repeatedly until it returns <tt>false</tt> |
| and the cumulative buffer is compacted after decoding ends.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>session</code> - The current Session</dd> |
| <dd><code>in</code> - the buffer to decode</dd> |
| <dd><code>out</code> - The <a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoderOutput.html" title="interface in org.apache.mina.filter.codec"><code>ProtocolDecoderOutput</code></a> that will receive the decoded message</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if your <tt>doDecode()</tt> returned <tt>true</tt> not |
| consuming the cumulative buffer.</dd> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - if the read data violated protocol specification</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="doDecode-org.apache.mina.core.session.IoSession-org.apache.mina.core.buffer.IoBuffer-org.apache.mina.filter.codec.ProtocolDecoderOutput-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doDecode</h4> |
| <pre>protected abstract boolean <a href="../../../../../src-html/org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#line.225">doDecode</a>(<a href="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</a> session, |
| <a href="../../../../../org/apache/mina/core/buffer/IoBuffer.html" title="class in org.apache.mina.core.buffer">IoBuffer</a> in, |
| <a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoderOutput.html" title="interface in org.apache.mina.filter.codec">ProtocolDecoderOutput</a> out) |
| throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <div class="block">Implement this method to consume the specified cumulative buffer and |
| decode its content into message(s).</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>session</code> - The current Session</dd> |
| <dd><code>in</code> - the cumulative buffer</dd> |
| <dd><code>out</code> - The <a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoderOutput.html" title="interface in org.apache.mina.filter.codec"><code>ProtocolDecoderOutput</code></a> that will receive the decoded message</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><tt>true</tt> if and only if there's more to decode in the buffer |
| and you want to have <tt>doDecode</tt> method invoked again. |
| Return <tt>false</tt> if remaining data is not enough to decode, |
| then this method will be invoked again when more data is |
| cumulated.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - if cannot decode <tt>in</tt>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="dispose-org.apache.mina.core.session.IoSession-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>dispose</h4> |
| <pre>public void <a href="../../../../../src-html/org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#line.233">dispose</a>(<a href="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</a> session) |
| throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <div class="block">Releases the cumulative buffer used by the specified <tt>session</tt>. |
| Please don't forget to call <tt>super.dispose( session )</tt> when you |
| override this method.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoder.html#dispose-org.apache.mina.core.session.IoSession-">dispose</a></code> in interface <code><a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoder.html" title="interface in org.apache.mina.filter.codec">ProtocolDecoder</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoderAdapter.html#dispose-org.apache.mina.core.session.IoSession-">dispose</a></code> in class <code><a href="../../../../../org/apache/mina/filter/codec/ProtocolDecoderAdapter.html" title="class in org.apache.mina.filter.codec">ProtocolDecoderAdapter</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>session</code> - The current Session</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - if failed to dispose all resources</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setTransportMetadataFragmentation-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>setTransportMetadataFragmentation</h4> |
| <pre>public void <a href="../../../../../src-html/org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#line.256">setTransportMetadataFragmentation</a>(boolean transportMetadataFragmentation)</pre> |
| <div class="block">Let the user change the way we handle fragmentation. If set to <tt>false</tt>, the |
| decode() method will not check the TransportMetadata fragmentation capability</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>transportMetadataFragmentation</code> - The flag to set.</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> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <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/CumulativeProtocolDecoder.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/mina/filter/codec/AbstractProtocolEncoderOutput.html" title="class in org.apache.mina.filter.codec"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/mina/filter/codec/ProtocolCodecException.html" title="class in org.apache.mina.filter.codec"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/mina/filter/codec/CumulativeProtocolDecoder.html" target="_top">Frames</a></li> |
| <li><a href="CumulativeProtocolDecoder.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><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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 © 2004–2016 <a href="http://mina.apache.org/">Apache MINA Project</a>. All rights reserved.</small></p> |
| </body> |
| </html> |