blob: 2371b59a8e244197298d70b2f0974179b547200b [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Wed Jun 15 18:09:19 CEST 2011 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
BufferedWriteFilter (Apache MINA 2.0.4 API Documentation)
</TITLE>
<META NAME="date" CONTENT="2011-06-15">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="BufferedWriteFilter (Apache MINA 2.0.4 API Documentation)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BufferedWriteFilter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../org/apache/mina/filter/buffer/IoBufferLazyInitializer.html" title="class in org.apache.mina.filter.buffer"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/mina/filter/buffer/BufferedWriteFilter.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="BufferedWriteFilter.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.mina.filter.buffer</FONT>
<BR>
Class BufferedWriteFilter</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html" title="class in org.apache.mina.core.filterchain">org.apache.mina.core.filterchain.IoFilterAdapter</A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.mina.filter.buffer.BufferedWriteFilter</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.html" title="interface in org.apache.mina.core.filterchain">IoFilter</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public final class <B>BufferedWriteFilter</B><DT>extends <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html" title="class in org.apache.mina.core.filterchain">IoFilterAdapter</A></DL>
</PRE>
<P>
An <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.html" title="interface in org.apache.mina.core.filterchain"><CODE>IoFilter</CODE></A> implementation used to buffer outgoing <A HREF="../../../../../org/apache/mina/core/write/WriteRequest.html" title="interface in org.apache.mina.core.write"><CODE>WriteRequest</CODE></A> almost
like what <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/BufferedOutputStream.html?is-external=true" title="class or interface in java.io"><CODE>BufferedOutputStream</CODE></A> does. Using this filter allows to be less dependent
from network latency. It is also useful when a session is generating very small messages
too frequently and consequently generating unnecessary traffic overhead.
Please note that it should always be placed before the <A HREF="../../../../../org/apache/mina/filter/codec/ProtocolCodecFilter.html" title="class in org.apache.mina.filter.codec"><CODE>ProtocolCodecFilter</CODE></A>
as it only handles <A HREF="../../../../../org/apache/mina/core/write/WriteRequest.html" title="interface in org.apache.mina.core.write"><CODE>WriteRequest</CODE></A>'s carrying <A HREF="../../../../../org/apache/mina/core/buffer/IoBuffer.html" title="class in org.apache.mina.core.buffer"><CODE>IoBuffer</CODE></A> objects.
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>MINA 2.0.0-M2</DD>
<DT><B>Author:</B></DT>
<DD><a href="http://mina.apache.org">Apache MINA Project</a></DD>
</DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="nested_classes_inherited_from_class_org.apache.mina.core.filterchain.IoFilter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Nested classes/interfaces inherited from interface org.apache.mina.core.filterchain.<A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.html" title="interface in org.apache.mina.core.filterchain">IoFilter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.NextFilter.html" title="interface in org.apache.mina.core.filterchain">IoFilter.NextFilter</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/buffer/BufferedWriteFilter.html#DEFAULT_BUFFER_SIZE">DEFAULT_BUFFER_SIZE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default buffer size value in bytes.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/buffer/BufferedWriteFilter.html#BufferedWriteFilter()">BufferedWriteFilter</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default constructor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/buffer/BufferedWriteFilter.html#BufferedWriteFilter(int)">BufferedWriteFilter</A></B>(int&nbsp;bufferSize)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor which sets buffer size to <code>bufferSize</code>.Uses a default
instance of <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent"><CODE>ConcurrentHashMap</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/buffer/BufferedWriteFilter.html#BufferedWriteFilter(int, org.apache.mina.util.LazyInitializedCacheMap)">BufferedWriteFilter</A></B>(int&nbsp;bufferSize,
<A HREF="../../../../../org/apache/mina/util/LazyInitializedCacheMap.html" title="class in org.apache.mina.util">LazyInitializedCacheMap</A>&lt;<A HREF="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</A>,<A HREF="../../../../../org/apache/mina/core/buffer/IoBuffer.html" title="class in org.apache.mina.core.buffer">IoBuffer</A>&gt;&nbsp;buffersMap)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor which sets buffer size to <code>bufferSize</code>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/buffer/BufferedWriteFilter.html#exceptionCaught(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession, java.lang.Throwable)">exceptionCaught</A></B>(<A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.NextFilter.html" title="interface in org.apache.mina.core.filterchain">IoFilter.NextFilter</A>&nbsp;nextFilter,
<A HREF="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</A>&nbsp;session,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A>&nbsp;cause)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Filters <A HREF="../../../../../org/apache/mina/core/service/IoHandler.html#exceptionCaught(org.apache.mina.core.session.IoSession, java.lang.Throwable)"><CODE>IoHandler.exceptionCaught(IoSession,Throwable)</CODE></A>
event.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/buffer/BufferedWriteFilter.html#filterWrite(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession, org.apache.mina.core.write.WriteRequest)">filterWrite</A></B>(<A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.NextFilter.html" title="interface in org.apache.mina.core.filterchain">IoFilter.NextFilter</A>&nbsp;nextFilter,
<A HREF="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</A>&nbsp;session,
<A HREF="../../../../../org/apache/mina/core/write/WriteRequest.html" title="interface in org.apache.mina.core.write">WriteRequest</A>&nbsp;writeRequest)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Filters <A HREF="../../../../../org/apache/mina/core/session/IoSession.html#write(java.lang.Object)"><CODE>IoSession.write(Object)</CODE></A> method invocation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/buffer/BufferedWriteFilter.html#flush(org.apache.mina.core.session.IoSession)">flush</A></B>(<A HREF="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</A>&nbsp;session)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Flushes the buffered data.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/buffer/BufferedWriteFilter.html#getBufferSize()">getBufferSize</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns buffer size.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/buffer/BufferedWriteFilter.html#sessionClosed(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession)">sessionClosed</A></B>(<A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.NextFilter.html" title="interface in org.apache.mina.core.filterchain">IoFilter.NextFilter</A>&nbsp;nextFilter,
<A HREF="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</A>&nbsp;session)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Filters <A HREF="../../../../../org/apache/mina/core/service/IoHandler.html#sessionClosed(org.apache.mina.core.session.IoSession)"><CODE>IoHandler.sessionClosed(IoSession)</CODE></A> event.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/buffer/BufferedWriteFilter.html#setBufferSize(int)">setBufferSize</A></B>(int&nbsp;bufferSize)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the buffer size but only for the newly created buffers.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.mina.core.filterchain.IoFilterAdapter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.mina.core.filterchain.<A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html" title="class in org.apache.mina.core.filterchain">IoFilterAdapter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#destroy()">destroy</A>, <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#filterClose(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession)">filterClose</A>, <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#init()">init</A>, <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#messageReceived(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession, java.lang.Object)">messageReceived</A>, <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#messageSent(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession, org.apache.mina.core.write.WriteRequest)">messageSent</A>, <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#onPostAdd(org.apache.mina.core.filterchain.IoFilterChain, java.lang.String, org.apache.mina.core.filterchain.IoFilter.NextFilter)">onPostAdd</A>, <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#onPostRemove(org.apache.mina.core.filterchain.IoFilterChain, java.lang.String, org.apache.mina.core.filterchain.IoFilter.NextFilter)">onPostRemove</A>, <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#onPreAdd(org.apache.mina.core.filterchain.IoFilterChain, java.lang.String, org.apache.mina.core.filterchain.IoFilter.NextFilter)">onPreAdd</A>, <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#onPreRemove(org.apache.mina.core.filterchain.IoFilterChain, java.lang.String, org.apache.mina.core.filterchain.IoFilter.NextFilter)">onPreRemove</A>, <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#sessionCreated(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession)">sessionCreated</A>, <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#sessionIdle(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession, org.apache.mina.core.session.IdleStatus)">sessionIdle</A>, <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#sessionOpened(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession)">sessionOpened</A>, <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#toString()">toString</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/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://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="DEFAULT_BUFFER_SIZE"><!-- --></A><H3>
DEFAULT_BUFFER_SIZE</H3>
<PRE>
public static final int <B>DEFAULT_BUFFER_SIZE</B></PRE>
<DL>
<DD>Default buffer size value in bytes.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.mina.filter.buffer.BufferedWriteFilter.DEFAULT_BUFFER_SIZE">Constant Field Values</A></DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="BufferedWriteFilter()"><!-- --></A><H3>
BufferedWriteFilter</H3>
<PRE>
public <B>BufferedWriteFilter</B>()</PRE>
<DL>
<DD>Default constructor. Sets buffer size to <A HREF="../../../../../org/apache/mina/filter/buffer/BufferedWriteFilter.html#DEFAULT_BUFFER_SIZE"><CODE>DEFAULT_BUFFER_SIZE</CODE></A>
bytes. Uses a default instance of <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent"><CODE>ConcurrentHashMap</CODE></A>.
<P>
</DL>
<HR>
<A NAME="BufferedWriteFilter(int)"><!-- --></A><H3>
BufferedWriteFilter</H3>
<PRE>
public <B>BufferedWriteFilter</B>(int&nbsp;bufferSize)</PRE>
<DL>
<DD>Constructor which sets buffer size to <code>bufferSize</code>.Uses a default
instance of <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent"><CODE>ConcurrentHashMap</CODE></A>.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>bufferSize</CODE> - the new buffer size</DL>
</DL>
<HR>
<A NAME="BufferedWriteFilter(int, org.apache.mina.util.LazyInitializedCacheMap)"><!-- --></A><H3>
BufferedWriteFilter</H3>
<PRE>
public <B>BufferedWriteFilter</B>(int&nbsp;bufferSize,
<A HREF="../../../../../org/apache/mina/util/LazyInitializedCacheMap.html" title="class in org.apache.mina.util">LazyInitializedCacheMap</A>&lt;<A HREF="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</A>,<A HREF="../../../../../org/apache/mina/core/buffer/IoBuffer.html" title="class in org.apache.mina.core.buffer">IoBuffer</A>&gt;&nbsp;buffersMap)</PRE>
<DL>
<DD>Constructor which sets buffer size to <code>bufferSize</code>. If
<code>buffersMap</code> is null then a default instance of <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent"><CODE>ConcurrentHashMap</CODE></A>
is created else the provided instance is used.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>bufferSize</CODE> - the new buffer size<DD><CODE>buffersMap</CODE> - the map to use for storing each session buffer</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getBufferSize()"><!-- --></A><H3>
getBufferSize</H3>
<PRE>
public int <B>getBufferSize</B>()</PRE>
<DL>
<DD>Returns buffer size.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setBufferSize(int)"><!-- --></A><H3>
setBufferSize</H3>
<PRE>
public void <B>setBufferSize</B>(int&nbsp;bufferSize)</PRE>
<DL>
<DD>Sets the buffer size but only for the newly created buffers.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bufferSize</CODE> - the new buffer size</DL>
</DD>
</DL>
<HR>
<A NAME="filterWrite(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession, org.apache.mina.core.write.WriteRequest)"><!-- --></A><H3>
filterWrite</H3>
<PRE>
public void <B>filterWrite</B>(<A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.NextFilter.html" title="interface in org.apache.mina.core.filterchain">IoFilter.NextFilter</A>&nbsp;nextFilter,
<A HREF="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</A>&nbsp;session,
<A HREF="../../../../../org/apache/mina/core/write/WriteRequest.html" title="interface in org.apache.mina.core.write">WriteRequest</A>&nbsp;writeRequest)
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Filters <A HREF="../../../../../org/apache/mina/core/session/IoSession.html#write(java.lang.Object)"><CODE>IoSession.write(Object)</CODE></A> method invocation.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.html#filterWrite(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession, org.apache.mina.core.write.WriteRequest)">filterWrite</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.html" title="interface in org.apache.mina.core.filterchain">IoFilter</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#filterWrite(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession, org.apache.mina.core.write.WriteRequest)">filterWrite</A></CODE> in class <CODE><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html" title="class in org.apache.mina.core.filterchain">IoFilterAdapter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE> - if <code>writeRequest.message</code> isn't an
<A HREF="../../../../../org/apache/mina/core/buffer/IoBuffer.html" title="class in org.apache.mina.core.buffer"><CODE>IoBuffer</CODE></A> instance.</DL>
</DD>
</DL>
<HR>
<A NAME="flush(org.apache.mina.core.session.IoSession)"><!-- --></A><H3>
flush</H3>
<PRE>
public void <B>flush</B>(<A HREF="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</A>&nbsp;session)</PRE>
<DL>
<DD>Flushes the buffered data.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>session</CODE> - the session where buffer will be written</DL>
</DD>
</DL>
<HR>
<A NAME="exceptionCaught(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession, java.lang.Throwable)"><!-- --></A><H3>
exceptionCaught</H3>
<PRE>
public void <B>exceptionCaught</B>(<A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.NextFilter.html" title="interface in org.apache.mina.core.filterchain">IoFilter.NextFilter</A>&nbsp;nextFilter,
<A HREF="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</A>&nbsp;session,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A>&nbsp;cause)
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Filters <A HREF="../../../../../org/apache/mina/core/service/IoHandler.html#exceptionCaught(org.apache.mina.core.session.IoSession, java.lang.Throwable)"><CODE>IoHandler.exceptionCaught(IoSession,Throwable)</CODE></A>
event.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.html#exceptionCaught(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession, java.lang.Throwable)">exceptionCaught</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.html" title="interface in org.apache.mina.core.filterchain">IoFilter</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#exceptionCaught(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession, java.lang.Throwable)">exceptionCaught</A></CODE> in class <CODE><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html" title="class in org.apache.mina.core.filterchain">IoFilterAdapter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="sessionClosed(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession)"><!-- --></A><H3>
sessionClosed</H3>
<PRE>
public void <B>sessionClosed</B>(<A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.NextFilter.html" title="interface in org.apache.mina.core.filterchain">IoFilter.NextFilter</A>&nbsp;nextFilter,
<A HREF="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</A>&nbsp;session)
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Filters <A HREF="../../../../../org/apache/mina/core/service/IoHandler.html#sessionClosed(org.apache.mina.core.session.IoSession)"><CODE>IoHandler.sessionClosed(IoSession)</CODE></A> event.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.html#sessionClosed(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession)">sessionClosed</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.html" title="interface in org.apache.mina.core.filterchain">IoFilter</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html#sessionClosed(org.apache.mina.core.filterchain.IoFilter.NextFilter, org.apache.mina.core.session.IoSession)">sessionClosed</A></CODE> in class <CODE><A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterAdapter.html" title="class in org.apache.mina.core.filterchain">IoFilterAdapter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BufferedWriteFilter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../org/apache/mina/filter/buffer/IoBufferLazyInitializer.html" title="class in org.apache.mina.filter.buffer"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/mina/filter/buffer/BufferedWriteFilter.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="BufferedWriteFilter.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &#169; 2004-2011 <a href="http://mina.apache.org/">Apache MINA Project</a>. All Rights Reserved.
</BODY>
</HTML>