📄 singlesessioniohandleradapter.html
字号:
<DL><DT><B>Parameters:</B><DD><CODE>session</CODE> - the session to which the handler is assigned</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="getSession()"><!-- --></A><H3>getSession</H3><PRE>protected <A HREF="../../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">IoSession</A> <B>getSession</B>()</PRE><DL><DD>Retrieves the session to which this handler is assigned.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the session</DL></DD></DL><HR><A NAME="exceptionCaught(java.lang.Throwable)"><!-- --></A><H3>exceptionCaught</H3><PRE>public void <B>exceptionCaught</B>(<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> th) 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/handler/multiton/SingleSessionIoHandler.html#exceptionCaught(java.lang.Throwable)">SingleSessionIoHandler</A></CODE></B></DD><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>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html#exceptionCaught(java.lang.Throwable)">exceptionCaught</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html" title="interface in org.apache.mina.handler.multiton">SingleSessionIoHandler</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>th</CODE> - the caught exception<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><DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/common/IoHandler.html#exceptionCaught(org.apache.mina.common.IoSession, java.lang.Throwable)"><CODE>IoHandler.exceptionCaught(IoSession, Throwable)</CODE></A></DL></DD></DL><HR><A NAME="messageReceived(java.lang.Object)"><!-- --></A><H3>messageReceived</H3><PRE>public void <B>messageReceived</B>(<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> 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><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html#messageReceived(java.lang.Object)">SingleSessionIoHandler</A></CODE></B></DD><DD>Invoked when protocol message is received. Implement your protocol flow here.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html#messageReceived(java.lang.Object)">messageReceived</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html" title="interface in org.apache.mina.handler.multiton">SingleSessionIoHandler</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>message</CODE> - the received message<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><DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/common/IoHandler.html#messageReceived(org.apache.mina.common.IoSession, java.lang.Object)"><CODE>IoHandler.messageReceived(IoSession, Object)</CODE></A></DL></DD></DL><HR><A NAME="messageSent(java.lang.Object)"><!-- --></A><H3>messageSent</H3><PRE>public void <B>messageSent</B>(<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> 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><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html#messageSent(java.lang.Object)">SingleSessionIoHandler</A></CODE></B></DD><DD>Invoked when protocol message that user requested by <A HREF="../../../../../org/apache/mina/common/IoSession.html#write(java.lang.Object)"><CODE>IoSession.write(Object)</CODE></A> is sent out actually.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html#messageSent(java.lang.Object)">messageSent</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html" title="interface in org.apache.mina.handler.multiton">SingleSessionIoHandler</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>message</CODE> - the sent message<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><DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/common/IoHandler.html#messageSent(org.apache.mina.common.IoSession, java.lang.Object)"><CODE>IoHandler.messageSent(IoSession, Object)</CODE></A></DL></DD></DL><HR><A NAME="sessionClosed()"><!-- --></A><H3>sessionClosed</H3><PRE>public void <B>sessionClosed</B>() 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/handler/multiton/SingleSessionIoHandler.html#sessionClosed()">SingleSessionIoHandler</A></CODE></B></DD><DD>Invoked when the connection is closed. This method is not invoked if the transport type is UDP.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html#sessionClosed()">sessionClosed</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html" title="interface in org.apache.mina.handler.multiton">SingleSessionIoHandler</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><DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/common/IoHandler.html#sessionClosed(org.apache.mina.common.IoSession)"><CODE>IoHandler.sessionClosed(IoSession)</CODE></A></DL></DD></DL><HR><A NAME="sessionCreated()"><!-- --></A><H3>sessionCreated</H3><PRE>public void <B>sessionCreated</B>() 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/handler/multiton/SingleSessionIoHandler.html#sessionCreated()">SingleSessionIoHandler</A></CODE></B></DD><DD>Invoked when the session is created. Initialize default socket parameters and user-defined attributes here.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html#sessionCreated()">sessionCreated</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html" title="interface in org.apache.mina.handler.multiton">SingleSessionIoHandler</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><DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/common/IoHandler.html#sessionCreated(org.apache.mina.common.IoSession)"><CODE>IoHandler.sessionCreated(IoSession)</CODE></A></DL></DD></DL><HR><A NAME="sessionIdle(org.apache.mina.common.IdleStatus)"><!-- --></A><H3>sessionIdle</H3><PRE>public void <B>sessionIdle</B>(<A HREF="../../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A> 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><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html#sessionIdle(org.apache.mina.common.IdleStatus)">SingleSessionIoHandler</A></CODE></B></DD><DD>Invoked when the connection is idle. Refer to <A HREF="../../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common"><CODE>IdleStatus</CODE></A>. This method is not invoked if the transport type is UDP.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html#sessionIdle(org.apache.mina.common.IdleStatus)">sessionIdle</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html" title="interface in org.apache.mina.handler.multiton">SingleSessionIoHandler</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>status</CODE> - the type of idleness<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><DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/common/IoHandler.html#sessionIdle(org.apache.mina.common.IoSession, org.apache.mina.common.IdleStatus)"><CODE>IoHandler.sessionIdle(IoSession, IdleStatus)</CODE></A></DL></DD></DL><HR><A NAME="sessionOpened()"><!-- --></A><H3>sessionOpened</H3><PRE>public void <B>sessionOpened</B>() 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/handler/multiton/SingleSessionIoHandler.html#sessionOpened()">SingleSessionIoHandler</A></CODE></B></DD><DD>Invoked when the connection is opened. This method is not invoked if the transport type is UDP.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html#sessionOpened()">sessionOpened</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html" title="interface in org.apache.mina.handler.multiton">SingleSessionIoHandler</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><DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/common/IoHandler.html#sessionOpened(org.apache.mina.common.IoSession)"><CODE>IoHandler.sessionOpened(IoSession)</CODE></A></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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SingleSessionIoHandlerAdapter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandler.html" title="interface in org.apache.mina.handler.multiton"><B>PREV CLASS</B></A> <A HREF="../../../../../org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.html" title="class in org.apache.mina.handler.multiton"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/mina/handler/multiton/SingleSessionIoHandlerAdapter.html" target="_top"><B>FRAMES</B></A> <A HREF="SingleSessionIoHandlerAdapter.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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 + -