📄 keepalivefilter.html
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/keepalive/KeepAliveFilter.html#setPolicy(org.apache.mina.filter.keepalive.KeepAlivePolicy)">setPolicy</A></B>(<A HREF="../../../../../org/apache/mina/filter/keepalive/KeepAlivePolicy.html" title="enum in org.apache.mina.filter.keepalive">KeepAlivePolicy</A> policy)</CODE><BR> </TD></TR></TABLE> <A NAME="methods_inherited_from_class_org.apache.mina.common.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.common.<A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html" title="class in org.apache.mina.common">IoFilterAdapter</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#destroy()">destroy</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#exceptionCaught(org.apache.mina.common.IoFilter.NextFilter, org.apache.mina.common.IoSession, java.lang.Throwable)">exceptionCaught</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#filterClose(org.apache.mina.common.IoFilter.NextFilter, org.apache.mina.common.IoSession)">filterClose</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#filterSetTrafficMask(org.apache.mina.common.IoFilter.NextFilter, org.apache.mina.common.IoSession, org.apache.mina.common.TrafficMask)">filterSetTrafficMask</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#filterWrite(org.apache.mina.common.IoFilter.NextFilter, org.apache.mina.common.IoSession, org.apache.mina.common.WriteRequest)">filterWrite</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#init()">init</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#onPreRemove(org.apache.mina.common.IoFilterChain, java.lang.String, org.apache.mina.common.IoFilter.NextFilter)">onPreRemove</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#sessionClosed(org.apache.mina.common.IoFilter.NextFilter, org.apache.mina.common.IoSession)">sessionClosed</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#sessionCreated(org.apache.mina.common.IoFilter.NextFilter, org.apache.mina.common.IoSession)">sessionCreated</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#sessionOpened(org.apache.mina.common.IoFilter.NextFilter, org.apache.mina.common.IoSession)">sessionOpened</A></CODE></TD></TR></TABLE> <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#toString()" title="class or interface in java.lang">toString</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> <P><!-- ========= 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="KeepAliveFilter(org.apache.mina.filter.keepalive.KeepAliveMessageFactory)"><!-- --></A><H3>KeepAliveFilter</H3><PRE>public <B>KeepAliveFilter</B>(<A HREF="../../../../../org/apache/mina/filter/keepalive/KeepAliveMessageFactory.html" title="interface in org.apache.mina.filter.keepalive">KeepAliveMessageFactory</A> messageFactory)</PRE><DL><DD>Creates a new instance with the default <A HREF="../../../../../org/apache/mina/filter/keepalive/KeepAlivePolicy.html" title="enum in org.apache.mina.filter.keepalive"><CODE>KeepAlivePolicy</CODE></A> and the default timeout values (<tt>policy</tt> = <A HREF="../../../../../org/apache/mina/filter/keepalive/KeepAlivePolicy.html#CLOSE"><CODE>KeepAlivePolicy.CLOSE</CODE></A>, <tt>keepAliveRequestInterval = 60</tt> and <tt>keepAliveRequestTimeout = 30</tt>).<P></DL><HR><A NAME="KeepAliveFilter(org.apache.mina.filter.keepalive.KeepAliveMessageFactory, org.apache.mina.filter.keepalive.KeepAlivePolicy)"><!-- --></A><H3>KeepAliveFilter</H3><PRE>public <B>KeepAliveFilter</B>(<A HREF="../../../../../org/apache/mina/filter/keepalive/KeepAliveMessageFactory.html" title="interface in org.apache.mina.filter.keepalive">KeepAliveMessageFactory</A> messageFactory, <A HREF="../../../../../org/apache/mina/filter/keepalive/KeepAlivePolicy.html" title="enum in org.apache.mina.filter.keepalive">KeepAlivePolicy</A> policy)</PRE><DL><DD>Creates a new instance with the default timeout values (<tt>keepAliveRequestInterval = 60</tt> and <tt>keepAliveRequestTimeout = 30</tt>).<P></DL><HR><A NAME="KeepAliveFilter(org.apache.mina.filter.keepalive.KeepAliveMessageFactory, org.apache.mina.filter.keepalive.KeepAlivePolicy, int, int)"><!-- --></A><H3>KeepAliveFilter</H3><PRE>public <B>KeepAliveFilter</B>(<A HREF="../../../../../org/apache/mina/filter/keepalive/KeepAliveMessageFactory.html" title="interface in org.apache.mina.filter.keepalive">KeepAliveMessageFactory</A> messageFactory, <A HREF="../../../../../org/apache/mina/filter/keepalive/KeepAlivePolicy.html" title="enum in org.apache.mina.filter.keepalive">KeepAlivePolicy</A> policy, int keepAliveRequestInterval, int keepAliveRequestTimeout)</PRE><DL><DD>Creates a new instance.<P></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="getPolicy()"><!-- --></A><H3>getPolicy</H3><PRE>public <A HREF="../../../../../org/apache/mina/filter/keepalive/KeepAlivePolicy.html" title="enum in org.apache.mina.filter.keepalive">KeepAlivePolicy</A> <B>getPolicy</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="setPolicy(org.apache.mina.filter.keepalive.KeepAlivePolicy)"><!-- --></A><H3>setPolicy</H3><PRE>public void <B>setPolicy</B>(<A HREF="../../../../../org/apache/mina/filter/keepalive/KeepAlivePolicy.html" title="enum in org.apache.mina.filter.keepalive">KeepAlivePolicy</A> policy)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="getKeepAliveRequestInterval()"><!-- --></A><H3>getKeepAliveRequestInterval</H3><PRE>public int <B>getKeepAliveRequestInterval</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="setKeepAliveRequestInterval(int)"><!-- --></A><H3>setKeepAliveRequestInterval</H3><PRE>public void <B>setKeepAliveRequestInterval</B>(int keepAliveRequestInterval)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="getKeepAliveRequestTimeout()"><!-- --></A><H3>getKeepAliveRequestTimeout</H3><PRE>public int <B>getKeepAliveRequestTimeout</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="setKeepAliveRequestTimeout(int)"><!-- --></A><H3>setKeepAliveRequestTimeout</H3><PRE>public void <B>setKeepAliveRequestTimeout</B>(int keepAliveRequestTimeout)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="getMessageFactory()"><!-- --></A><H3>getMessageFactory</H3><PRE>public <A HREF="../../../../../org/apache/mina/filter/keepalive/KeepAliveMessageFactory.html" title="interface in org.apache.mina.filter.keepalive">KeepAliveMessageFactory</A> <B>getMessageFactory</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="onPreAdd(org.apache.mina.common.IoFilterChain, java.lang.String, org.apache.mina.common.IoFilter.NextFilter)"><!-- --></A><H3>onPreAdd</H3><PRE>public void <B>onPreAdd</B>(<A HREF="../../../../../org/apache/mina/common/IoFilterChain.html" title="interface in org.apache.mina.common">IoFilterChain</A> parent, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> name, <A HREF="../../../../../org/apache/mina/common/IoFilter.NextFilter.html" title="interface in org.apache.mina.common">IoFilter.NextFilter</A> nextFilter) 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><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/mina/common/IoFilter.html#onPreAdd(org.apache.mina.common.IoFilterChain, java.lang.String, org.apache.mina.common.IoFilter.NextFilter)">IoFilter</A></CODE></B></DD><DD>Invoked before this filter is added to the specified <tt>parent</tt>. Please note that this method can be invoked more than once if this filter is added to more than one parents. This method is not invoked before <A HREF="../../../../../org/apache/mina/common/IoFilter.html#init()"><CODE>IoFilter.init()</CODE></A> is invoked.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/mina/common/IoFilter.html#onPreAdd(org.apache.mina.common.IoFilterChain, java.lang.String, org.apache.mina.common.IoFilter.NextFilter)">onPreAdd</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/mina/common/IoFilter.html" title="interface in org.apache.mina.common">IoFilter</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#onPreAdd(org.apache.mina.common.IoFilterChain, java.lang.String, org.apache.mina.common.IoFilter.NextFilter)">onPreAdd</A></CODE> in class <CODE><A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html" title="class in org.apache.mina.common">IoFilterAdapter</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>parent</CODE> - the parent who called this method<DD><CODE>name</CODE> - the name assigned to this filter<DD><CODE>nextFilter</CODE> - the <A HREF="../../../../../org/apache/mina/common/IoFilter.NextFilter.html" title="interface in org.apache.mina.common"><CODE>IoFilter.NextFilter</CODE></A> for this filter. You can reuse this object until this filter is removed from the chain.<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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -