⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iohandler.html

📁 MINA+API 关于MINA的API
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="sessionCreated(org.apache.mina.common.IoSession)"><!-- --></A><H3>sessionCreated</H3><PRE>void <B>sessionCreated</B>(<A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">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>Invoked from an I/O processor thread when a new connection has been created. Because this method is supposed to be called from the same thread that handles I/O of multiple sessions, please implement this method to perform tasks that consumes minimal amount of time such as socket parameter and user-defined session attribute initialization.<P><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="sessionOpened(org.apache.mina.common.IoSession)"><!-- --></A><H3>sessionOpened</H3><PRE>void <B>sessionOpened</B>(<A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">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>Invoked when a connection has been opened.  This method is invoked after <A HREF="../../../../org/apache/mina/common/IoHandler.html#sessionCreated(org.apache.mina.common.IoSession)"><CODE>sessionCreated(IoSession)</CODE></A>.  The biggest difference from <A HREF="../../../../org/apache/mina/common/IoHandler.html#sessionCreated(org.apache.mina.common.IoSession)"><CODE>sessionCreated(IoSession)</CODE></A> is that it's invoked from other thread than an I/O processor thread once thread modesl is configured properly.<P><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.common.IoSession)"><!-- --></A><H3>sessionClosed</H3><PRE>void <B>sessionClosed</B>(<A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">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>Invoked when a connection is closed.<P><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="sessionIdle(org.apache.mina.common.IoSession, org.apache.mina.common.IdleStatus)"><!-- --></A><H3>sessionIdle</H3><PRE>void <B>sessionIdle</B>(<A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">IoSession</A>&nbsp;session,                 <A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status)                 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>Invoked with the related <A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common"><CODE>IdleStatus</CODE></A> when a connection becomes idle. This method is not invoked if the transport type is UDP; it's a known bug, and will be fixed in 2.0.<P><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="exceptionCaught(org.apache.mina.common.IoSession, java.lang.Throwable)"><!-- --></A><H3>exceptionCaught</H3><PRE>void <B>exceptionCaught</B>(<A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">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>Invoked when any exception is thrown by user <A HREF="../../../../org/apache/mina/common/IoHandler.html" title="interface in org.apache.mina.common"><CODE>IoHandler</CODE></A> implementation or by MINA.  If <code>cause</code> is instanceof <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io"><CODE>IOException</CODE></A>, MINA will close the connection automatically.<P><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="messageReceived(org.apache.mina.common.IoSession, java.lang.Object)"><!-- --></A><H3>messageReceived</H3><PRE>void <B>messageReceived</B>(<A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">IoSession</A>&nbsp;session,                     <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>&nbsp;message)                     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>Invoked when a message is received.<P><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="messageSent(org.apache.mina.common.IoSession, java.lang.Object)"><!-- --></A><H3>messageSent</H3><PRE>void <B>messageSent</B>(<A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">IoSession</A>&nbsp;session,                 <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>&nbsp;message)                 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>Invoked when a message written by <A HREF="../../../../org/apache/mina/common/IoSession.html#write(java.lang.Object)"><CODE>IoSession.write(Object)</CODE></A> is sent out.<P><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/IoHandler.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;<A HREF="../../../../org/apache/mina/common/IoFutureListener.html" title="interface in org.apache.mina.common"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../org/apache/mina/common/IoHandlerAdapter.html" title="class in org.apache.mina.common"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html?org/apache/mina/common/IoHandler.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="IoHandler.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright 漏 2004-2008 <a href="http://mina.apache.org/">Apache MINA Project</a>. All Rights Reserved.</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -