| <!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_33) on Tue Aug 21 16:43:15 CEST 2012 --> |
| <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <TITLE> |
| IoSession (Apache MINA 2.0.5 API) |
| </TITLE> |
| |
| <META NAME="date" CONTENT="2012-08-21"> |
| |
| <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="IoSession (Apache MINA 2.0.5 API)"; |
| } |
| } |
| </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> </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/IoSession.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/core/session/IoEventType.html" title="enum in org.apache.mina.core.session"><B>PREV CLASS</B></A> |
| <A HREF="../../../../../org/apache/mina/core/session/IoSessionAttributeMap.html" title="interface in org.apache.mina.core.session"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../index.html?org/apache/mina/core/session/IoSession.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="IoSession.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 | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | CONSTR | <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.core.session</FONT> |
| <BR> |
| Interface IoSession</H2> |
| <DL> |
| <DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../../org/apache/mina/transport/serial/SerialSession.html" title="interface in org.apache.mina.transport.serial">SerialSession</A></DD> |
| </DL> |
| <DL> |
| <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../org/apache/mina/core/session/AbstractIoSession.html" title="class in org.apache.mina.core.session">AbstractIoSession</A>, <A HREF="../../../../../org/apache/mina/transport/socket/apr/AprSession.html" title="class in org.apache.mina.transport.socket.apr">AprSession</A>, <A HREF="../../../../../org/apache/mina/core/session/DummySession.html" title="class in org.apache.mina.core.session">DummySession</A>, <A HREF="../../../../../org/apache/mina/transport/socket/nio/NioSession.html" title="class in org.apache.mina.transport.socket.nio">NioSession</A>, <A HREF="../../../../../org/apache/mina/filter/codec/ProtocolCodecSession.html" title="class in org.apache.mina.filter.codec">ProtocolCodecSession</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT><PRE>public interface <B>IoSession</B></DL> |
| </PRE> |
| |
| <P> |
| A handle which represents connection between two end-points regardless of |
| transport types. |
| <p/> |
| <A HREF="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session"><CODE>IoSession</CODE></A> provides user-defined attributes. User-defined attributes |
| are application-specific data which are associated with a session. |
| It often contains objects that represents the state of a higher-level protocol |
| and becomes a way to exchange data between filters and handlers. |
| <p/> |
| <h3>Adjusting Transport Type Specific Properties</h3> |
| <p/> |
| You can simply downcast the session to an appropriate subclass. |
| </p> |
| <p/> |
| <h3>Thread Safety</h3> |
| <p/> |
| <A HREF="../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session"><CODE>IoSession</CODE></A> is thread-safe. But please note that performing |
| more than one <A HREF="../../../../../org/apache/mina/core/session/IoSession.html#write(java.lang.Object)"><CODE>write(Object)</CODE></A> calls at the same time will |
| cause the <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)"><CODE>IoFilter.filterWrite(IoFilter.NextFilter,IoSession,WriteRequest)</CODE></A> |
| to be executed simultaneously, and therefore you have to make sure the |
| <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilter.html" title="interface in org.apache.mina.core.filterchain"><CODE>IoFilter</CODE></A> implementations you're using are thread-safe, too. |
| </p> |
| <p/> |
| <h3>Equality of Sessions</h3> |
| TODO : The getId() method is totally wrong. We can't base |
| a method which is designed to create a unique ID on the hashCode method. |
| <CODE>#equals(Object)</CODE> and <CODE>#hashCode()</CODE> shall not be overriden |
| to the default behavior that is defined in <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><CODE>Object</CODE></A>. |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Author:</B></DT> |
| <DD><a href="http://mina.apache.org">Apache MINA Project</a></DD> |
| </DL> |
| <HR> |
| |
| <P> |
| |
| <!-- ========== 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> <A HREF="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future">CloseFuture</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#close()">close</A></B>()</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>use <A HREF="../../../../../org/apache/mina/core/session/IoSession.html#close(boolean)"><CODE>close(boolean)</CODE></A></I></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future">CloseFuture</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#close(boolean)">close</A></B>(boolean immediately)</CODE> |
| |
| <BR> |
| Closes this session immediately or after all queued write requests |
| are flushed.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#containsAttribute(java.lang.Object)">containsAttribute</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key)</CODE> |
| |
| <BR> |
| Returns <tt>true</tt> if this session contains the attribute with |
| the specified <tt>key</tt>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getAttachment()">getAttachment</A></B>()</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>Use <A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getAttribute(java.lang.Object)"><CODE>getAttribute(Object)</CODE></A> instead.</I></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getAttribute(java.lang.Object)">getAttribute</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key)</CODE> |
| |
| <BR> |
| Returns the value of the user-defined attribute of this session.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getAttribute(java.lang.Object, java.lang.Object)">getAttribute</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> defaultValue)</CODE> |
| |
| <BR> |
| Returns the value of user defined attribute associated with the |
| specified key.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A><<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getAttributeKeys()">getAttributeKeys</A></B>()</CODE> |
| |
| <BR> |
| Returns the set of keys of all user-defined attributes.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getBothIdleCount()">getBothIdleCount</A></B>()</CODE> |
| |
| <BR> |
| Returns the number of the fired continuous <tt>sessionIdle</tt> events |
| for <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#BOTH_IDLE"><CODE>IdleStatus.BOTH_IDLE</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future">CloseFuture</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getCloseFuture()">getCloseFuture</A></B>()</CODE> |
| |
| <BR> |
| Returns the <A HREF="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future"><CODE>CloseFuture</CODE></A> of this session.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../../org/apache/mina/core/session/IoSessionConfig.html" title="interface in org.apache.mina.core.session">IoSessionConfig</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getConfig()">getConfig</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getCreationTime()">getCreationTime</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getCurrentWriteMessage()">getCurrentWriteMessage</A></B>()</CODE> |
| |
| <BR> |
| Returns the message which is being written by <A HREF="../../../../../org/apache/mina/core/service/IoService.html" title="interface in org.apache.mina.core.service"><CODE>IoService</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../../org/apache/mina/core/write/WriteRequest.html" title="interface in org.apache.mina.core.write">WriteRequest</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getCurrentWriteRequest()">getCurrentWriteRequest</A></B>()</CODE> |
| |
| <BR> |
| Returns the <A HREF="../../../../../org/apache/mina/core/write/WriteRequest.html" title="interface in org.apache.mina.core.write"><CODE>WriteRequest</CODE></A> which is being processed by |
| <A HREF="../../../../../org/apache/mina/core/service/IoService.html" title="interface in org.apache.mina.core.service"><CODE>IoService</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterChain.html" title="interface in org.apache.mina.core.filterchain">IoFilterChain</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getFilterChain()">getFilterChain</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../../org/apache/mina/core/service/IoHandler.html" title="interface in org.apache.mina.core.service">IoHandler</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getHandler()">getHandler</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getId()">getId</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getIdleCount(org.apache.mina.core.session.IdleStatus)">getIdleCount</A></B>(<A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session">IdleStatus</A> status)</CODE> |
| |
| <BR> |
| Returns the number of the fired continuous <tt>sessionIdle</tt> events |
| for the specified <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session"><CODE>IdleStatus</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getLastBothIdleTime()">getLastBothIdleTime</A></B>()</CODE> |
| |
| <BR> |
| Returns the time in milliseconds when the last <tt>sessionIdle</tt> event |
| is fired for <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#BOTH_IDLE"><CODE>IdleStatus.BOTH_IDLE</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getLastIdleTime(org.apache.mina.core.session.IdleStatus)">getLastIdleTime</A></B>(<A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session">IdleStatus</A> status)</CODE> |
| |
| <BR> |
| Returns the time in milliseconds when the last <tt>sessionIdle</tt> event |
| is fired for the specified <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session"><CODE>IdleStatus</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getLastIoTime()">getLastIoTime</A></B>()</CODE> |
| |
| <BR> |
| Returns the time in millis when I/O occurred lastly.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getLastReaderIdleTime()">getLastReaderIdleTime</A></B>()</CODE> |
| |
| <BR> |
| Returns the time in milliseconds when the last <tt>sessionIdle</tt> event |
| is fired for <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#READER_IDLE"><CODE>IdleStatus.READER_IDLE</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getLastReadTime()">getLastReadTime</A></B>()</CODE> |
| |
| <BR> |
| Returns the time in millis when read operation occurred lastly.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getLastWriterIdleTime()">getLastWriterIdleTime</A></B>()</CODE> |
| |
| <BR> |
| Returns the time in milliseconds when the last <tt>sessionIdle</tt> event |
| is fired for <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#WRITER_IDLE"><CODE>IdleStatus.WRITER_IDLE</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getLastWriteTime()">getLastWriteTime</A></B>()</CODE> |
| |
| <BR> |
| Returns the time in millis when write operation occurred lastly.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getLocalAddress()">getLocalAddress</A></B>()</CODE> |
| |
| <BR> |
| Returns the socket address of local machine which is associated with this |
| session.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getReadBytes()">getReadBytes</A></B>()</CODE> |
| |
| <BR> |
| Returns the total number of bytes which were read from this session.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> double</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getReadBytesThroughput()">getReadBytesThroughput</A></B>()</CODE> |
| |
| <BR> |
| Returns the number of read bytes per second.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getReaderIdleCount()">getReaderIdleCount</A></B>()</CODE> |
| |
| <BR> |
| Returns the number of the fired continuous <tt>sessionIdle</tt> events |
| for <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#READER_IDLE"><CODE>IdleStatus.READER_IDLE</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getReadMessages()">getReadMessages</A></B>()</CODE> |
| |
| <BR> |
| Returns the total number of messages which were read and decoded from this session.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> double</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getReadMessagesThroughput()">getReadMessagesThroughput</A></B>()</CODE> |
| |
| <BR> |
| Returns the number of read messages per second.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getRemoteAddress()">getRemoteAddress</A></B>()</CODE> |
| |
| <BR> |
| Returns the socket address of remote peer.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getScheduledWriteBytes()">getScheduledWriteBytes</A></B>()</CODE> |
| |
| <BR> |
| Returns the number of bytes which are scheduled to be written to this |
| session.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getScheduledWriteMessages()">getScheduledWriteMessages</A></B>()</CODE> |
| |
| <BR> |
| Returns the number of messages which are scheduled to be written to this session.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../../org/apache/mina/core/service/IoService.html" title="interface in org.apache.mina.core.service">IoService</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getService()">getService</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getServiceAddress()">getServiceAddress</A></B>()</CODE> |
| |
| <BR> |
| Returns the socket address of the <A HREF="../../../../../org/apache/mina/core/service/IoService.html" title="interface in org.apache.mina.core.service"><CODE>IoService</CODE></A> listens to to manage |
| this session.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../../org/apache/mina/core/service/TransportMetadata.html" title="interface in org.apache.mina.core.service">TransportMetadata</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getTransportMetadata()">getTransportMetadata</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../../org/apache/mina/core/write/WriteRequestQueue.html" title="interface in org.apache.mina.core.write">WriteRequestQueue</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getWriteRequestQueue()">getWriteRequestQueue</A></B>()</CODE> |
| |
| <BR> |
| TODO Add method documentation</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getWriterIdleCount()">getWriterIdleCount</A></B>()</CODE> |
| |
| <BR> |
| Returns the number of the fired continuous <tt>sessionIdle</tt> events |
| for <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#WRITER_IDLE"><CODE>IdleStatus.WRITER_IDLE</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getWrittenBytes()">getWrittenBytes</A></B>()</CODE> |
| |
| <BR> |
| Returns the total number of bytes which were written to this session.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> double</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getWrittenBytesThroughput()">getWrittenBytesThroughput</A></B>()</CODE> |
| |
| <BR> |
| Returns the number of written bytes per second.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getWrittenMessages()">getWrittenMessages</A></B>()</CODE> |
| |
| <BR> |
| Returns the total number of messages which were written and encoded by this session.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> double</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getWrittenMessagesThroughput()">getWrittenMessagesThroughput</A></B>()</CODE> |
| |
| <BR> |
| Returns the number of written messages per second.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#isBothIdle()">isBothIdle</A></B>()</CODE> |
| |
| <BR> |
| Returns <code>true</code> if this session is <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#BOTH_IDLE"><CODE>IdleStatus.BOTH_IDLE</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#isClosing()">isClosing</A></B>()</CODE> |
| |
| <BR> |
| Returns <code>true</tt> if and only if this session is being closed |
| (but not disconnected yet) or is closed.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#isConnected()">isConnected</A></B>()</CODE> |
| |
| <BR> |
| Returns <code>true</code> if this session is connected with remote peer.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#isIdle(org.apache.mina.core.session.IdleStatus)">isIdle</A></B>(<A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session">IdleStatus</A> status)</CODE> |
| |
| <BR> |
| Returns <code>true</code> if this session is idle for the specified |
| <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session"><CODE>IdleStatus</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#isReaderIdle()">isReaderIdle</A></B>()</CODE> |
| |
| <BR> |
| Returns <code>true</code> if this session is <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#READER_IDLE"><CODE>IdleStatus.READER_IDLE</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#isReadSuspended()">isReadSuspended</A></B>()</CODE> |
| |
| <BR> |
| Is read operation is suspended for this session.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#isWriterIdle()">isWriterIdle</A></B>()</CODE> |
| |
| <BR> |
| Returns <code>true</code> if this session is <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#WRITER_IDLE"><CODE>IdleStatus.WRITER_IDLE</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#isWriteSuspended()">isWriteSuspended</A></B>()</CODE> |
| |
| <BR> |
| Is write operation is suspended for this session.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../../org/apache/mina/core/future/ReadFuture.html" title="interface in org.apache.mina.core.future">ReadFuture</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#read()">read</A></B>()</CODE> |
| |
| <BR> |
| TODO This javadoc is wrong.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#removeAttribute(java.lang.Object)">removeAttribute</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key)</CODE> |
| |
| <BR> |
| Removes a user-defined attribute with the specified key.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#removeAttribute(java.lang.Object, java.lang.Object)">removeAttribute</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> value)</CODE> |
| |
| <BR> |
| Removes a user defined attribute with the specified key if the current |
| attribute value is equal to the specified value.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#replaceAttribute(java.lang.Object, java.lang.Object, java.lang.Object)">replaceAttribute</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> oldValue, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> newValue)</CODE> |
| |
| <BR> |
| Replaces a user defined attribute with the specified key if the |
| value of the attribute is equals to the specified old value.</TD> |
| </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/core/session/IoSession.html#resumeRead()">resumeRead</A></B>()</CODE> |
| |
| <BR> |
| Resumes read operations for this session.</TD> |
| </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/core/session/IoSession.html#resumeWrite()">resumeWrite</A></B>()</CODE> |
| |
| <BR> |
| Resumes write operations for this session.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#setAttachment(java.lang.Object)">setAttachment</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> attachment)</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <I>Use <A HREF="../../../../../org/apache/mina/core/session/IoSession.html#setAttribute(java.lang.Object, java.lang.Object)"><CODE>setAttribute(Object, Object)</CODE></A> instead.</I></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#setAttribute(java.lang.Object)">setAttribute</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key)</CODE> |
| |
| <BR> |
| Sets a user defined attribute without a value.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#setAttribute(java.lang.Object, java.lang.Object)">setAttribute</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> value)</CODE> |
| |
| <BR> |
| Sets a user-defined attribute.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#setAttributeIfAbsent(java.lang.Object)">setAttributeIfAbsent</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key)</CODE> |
| |
| <BR> |
| Sets a user defined attribute without a value if the attribute with |
| the specified key is not set yet.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#setAttributeIfAbsent(java.lang.Object, java.lang.Object)">setAttributeIfAbsent</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> value)</CODE> |
| |
| <BR> |
| Sets a user defined attribute if the attribute with the specified key |
| is not set yet.</TD> |
| </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/core/session/IoSession.html#setCurrentWriteRequest(org.apache.mina.core.write.WriteRequest)">setCurrentWriteRequest</A></B>(<A HREF="../../../../../org/apache/mina/core/write/WriteRequest.html" title="interface in org.apache.mina.core.write">WriteRequest</A> currentWriteRequest)</CODE> |
| |
| <BR> |
| TODO setWriteRequestQueue.</TD> |
| </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/core/session/IoSession.html#suspendRead()">suspendRead</A></B>()</CODE> |
| |
| <BR> |
| Suspends read operations for this session.</TD> |
| </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/core/session/IoSession.html#suspendWrite()">suspendWrite</A></B>()</CODE> |
| |
| <BR> |
| Suspends write operations for this session.</TD> |
| </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/core/session/IoSession.html#updateThroughput(long, boolean)">updateThroughput</A></B>(long currentTime, |
| boolean force)</CODE> |
| |
| <BR> |
| Update all statistical properties related with throughput assuming |
| the specified time is the current time.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../../org/apache/mina/core/future/WriteFuture.html" title="interface in org.apache.mina.core.future">WriteFuture</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#write(java.lang.Object)">write</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> message)</CODE> |
| |
| <BR> |
| Writes the specified <code>message</code> to remote peer.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../../org/apache/mina/core/future/WriteFuture.html" title="interface in org.apache.mina.core.future">WriteFuture</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#write(java.lang.Object, java.net.SocketAddress)">write</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> message, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A> destination)</CODE> |
| |
| <BR> |
| (Optional) Writes the specified <tt>message</tt> to the specified <tt>destination</tt>.</TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ 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="getId()"><!-- --></A><H3> |
| getId</H3> |
| <PRE> |
| long <B>getId</B>()</PRE> |
| <DL> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>a unique identifier for this session. Every session has its own |
| ID which is different from each other. |
| |
| TODO : The way it's implemented does not guarantee that the contract is |
| respected. It uses the HashCode() method which don't guarantee the key |
| unicity.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getService()"><!-- --></A><H3> |
| getService</H3> |
| <PRE> |
| <A HREF="../../../../../org/apache/mina/core/service/IoService.html" title="interface in org.apache.mina.core.service">IoService</A> <B>getService</B>()</PRE> |
| <DL> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the <A HREF="../../../../../org/apache/mina/core/service/IoService.html" title="interface in org.apache.mina.core.service"><CODE>IoService</CODE></A> which provides I/O service to this session.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getHandler()"><!-- --></A><H3> |
| getHandler</H3> |
| <PRE> |
| <A HREF="../../../../../org/apache/mina/core/service/IoHandler.html" title="interface in org.apache.mina.core.service">IoHandler</A> <B>getHandler</B>()</PRE> |
| <DL> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the <A HREF="../../../../../org/apache/mina/core/service/IoHandler.html" title="interface in org.apache.mina.core.service"><CODE>IoHandler</CODE></A> which handles this session.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getConfig()"><!-- --></A><H3> |
| getConfig</H3> |
| <PRE> |
| <A HREF="../../../../../org/apache/mina/core/session/IoSessionConfig.html" title="interface in org.apache.mina.core.session">IoSessionConfig</A> <B>getConfig</B>()</PRE> |
| <DL> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the configuration of this session.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getFilterChain()"><!-- --></A><H3> |
| getFilterChain</H3> |
| <PRE> |
| <A HREF="../../../../../org/apache/mina/core/filterchain/IoFilterChain.html" title="interface in org.apache.mina.core.filterchain">IoFilterChain</A> <B>getFilterChain</B>()</PRE> |
| <DL> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the filter chain that only affects this session.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getWriteRequestQueue()"><!-- --></A><H3> |
| getWriteRequestQueue</H3> |
| <PRE> |
| <A HREF="../../../../../org/apache/mina/core/write/WriteRequestQueue.html" title="interface in org.apache.mina.core.write">WriteRequestQueue</A> <B>getWriteRequestQueue</B>()</PRE> |
| <DL> |
| <DD>TODO Add method documentation |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getTransportMetadata()"><!-- --></A><H3> |
| getTransportMetadata</H3> |
| <PRE> |
| <A HREF="../../../../../org/apache/mina/core/service/TransportMetadata.html" title="interface in org.apache.mina.core.service">TransportMetadata</A> <B>getTransportMetadata</B>()</PRE> |
| <DL> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the <A HREF="../../../../../org/apache/mina/core/service/TransportMetadata.html" title="interface in org.apache.mina.core.service"><CODE>TransportMetadata</CODE></A> that this session runs on.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="read()"><!-- --></A><H3> |
| read</H3> |
| <PRE> |
| <A HREF="../../../../../org/apache/mina/core/future/ReadFuture.html" title="interface in org.apache.mina.core.future">ReadFuture</A> <B>read</B>()</PRE> |
| <DL> |
| <DD>TODO This javadoc is wrong. The return tag should be short. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>a <A HREF="../../../../../org/apache/mina/core/future/ReadFuture.html" title="interface in org.apache.mina.core.future"><CODE>ReadFuture</CODE></A> which is notified when a new message is |
| received, the connection is closed or an exception is caught. This |
| operation is especially useful when you implement a client application. |
| TODO : Describe here how we enable this feature. |
| However, please note that this operation is disabled by default and |
| throw <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang"><CODE>IllegalStateException</CODE></A> because all received events must be |
| queued somewhere to support this operation, possibly leading to memory |
| leak. This means you have to keep calling <A HREF="../../../../../org/apache/mina/core/session/IoSession.html#read()"><CODE>read()</CODE></A> once you |
| enabled this operation. To enable this operation, please call |
| <A HREF="../../../../../org/apache/mina/core/session/IoSessionConfig.html#setUseReadOperation(boolean)"><CODE>IoSessionConfig.setUseReadOperation(boolean)</CODE></A> with <tt>true</tt>. |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if |
| <A HREF="../../../../../org/apache/mina/core/session/IoSessionConfig.html#setUseReadOperation(boolean)"><CODE>useReadOperation</CODE></A> |
| option has not been enabled.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="write(java.lang.Object)"><!-- --></A><H3> |
| write</H3> |
| <PRE> |
| <A HREF="../../../../../org/apache/mina/core/future/WriteFuture.html" title="interface in org.apache.mina.core.future">WriteFuture</A> <B>write</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> message)</PRE> |
| <DL> |
| <DD>Writes the specified <code>message</code> to remote peer. This |
| operation is asynchronous; <A HREF="../../../../../org/apache/mina/core/service/IoHandler.html#messageSent(org.apache.mina.core.session.IoSession, java.lang.Object)"><CODE>IoHandler.messageSent(IoSession,Object)</CODE></A> |
| will be invoked when the message is actually sent to remote peer. |
| You can also wait for the returned <A HREF="../../../../../org/apache/mina/core/future/WriteFuture.html" title="interface in org.apache.mina.core.future"><CODE>WriteFuture</CODE></A> if you want |
| to wait for the message actually written. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="write(java.lang.Object, java.net.SocketAddress)"><!-- --></A><H3> |
| write</H3> |
| <PRE> |
| <A HREF="../../../../../org/apache/mina/core/future/WriteFuture.html" title="interface in org.apache.mina.core.future">WriteFuture</A> <B>write</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> message, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A> destination)</PRE> |
| <DL> |
| <DD>(Optional) Writes the specified <tt>message</tt> to the specified <tt>destination</tt>. |
| This operation is asynchronous; <A HREF="../../../../../org/apache/mina/core/service/IoHandler.html#messageSent(org.apache.mina.core.session.IoSession, java.lang.Object)"><CODE>IoHandler.messageSent(IoSession, Object)</CODE></A> |
| will be invoked when the message is actually sent to remote peer. You can |
| also wait for the returned <A HREF="../../../../../org/apache/mina/core/future/WriteFuture.html" title="interface in org.apache.mina.core.future"><CODE>WriteFuture</CODE></A> if you want to wait for |
| the message actually written. |
| <p> |
| When you implement a client that receives a broadcast message from a server |
| such as DHCP server, the client might need to send a response message for the |
| broadcast message the server sent. Because the remote address of the session |
| is not the address of the server in case of broadcasting, there should be a |
| way to specify the destination when you write the response message. |
| This interface provides <A HREF="../../../../../org/apache/mina/core/session/IoSession.html#write(java.lang.Object, java.net.SocketAddress)"><CODE>write(Object, SocketAddress)</CODE></A> method so you |
| can specify the destination. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>destination</CODE> - <tt>null</tt> if you want the message sent to the |
| default remote address |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if this operation is not supported</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="close(boolean)"><!-- --></A><H3> |
| close</H3> |
| <PRE> |
| <A HREF="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future">CloseFuture</A> <B>close</B>(boolean immediately)</PRE> |
| <DL> |
| <DD>Closes this session immediately or after all queued write requests |
| are flushed. This operation is asynchronous. Wait for the returned |
| <A HREF="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future"><CODE>CloseFuture</CODE></A> if you want to wait for the session actually closed. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>immediately</CODE> - <code>true</code> to close this session immediately |
| (i.e. <A HREF="../../../../../org/apache/mina/core/session/IoSession.html#close()"><CODE>close()</CODE></A>). The pending write requests |
| will simply be discarded. |
| <code>false</code> to close this session after all queued |
| write requests are flushed (i.e. <CODE>#closeOnFlush()</CODE>).</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="close()"><!-- --></A><H3> |
| close</H3> |
| <PRE> |
| <FONT SIZE="-1"><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</A> |
| </FONT><A HREF="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future">CloseFuture</A> <B>close</B>()</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>use <A HREF="../../../../../org/apache/mina/core/session/IoSession.html#close(boolean)"><CODE>close(boolean)</CODE></A></I> |
| <P> |
| <DD>Closes this session after all queued write requests |
| are flushed. This operation is asynchronous. Wait for the returned |
| <A HREF="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future"><CODE>CloseFuture</CODE></A> if you want to wait for the session actually closed. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getAttachment()"><!-- --></A><H3> |
| getAttachment</H3> |
| <PRE> |
| <FONT SIZE="-1"><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</A> |
| </FONT><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>getAttachment</B>()</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>Use <A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getAttribute(java.lang.Object)"><CODE>getAttribute(Object)</CODE></A> instead.</I> |
| <P> |
| <DD>Returns an attachment of this session. |
| This method is identical with <tt>getAttribute( "" )</tt>. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setAttachment(java.lang.Object)"><!-- --></A><H3> |
| setAttachment</H3> |
| <PRE> |
| <FONT SIZE="-1"><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</A> |
| </FONT><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>setAttachment</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> attachment)</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <I>Use <A HREF="../../../../../org/apache/mina/core/session/IoSession.html#setAttribute(java.lang.Object, java.lang.Object)"><CODE>setAttribute(Object, Object)</CODE></A> instead.</I> |
| <P> |
| <DD>Sets an attachment of this session. |
| This method is identical with <tt>setAttribute( "", attachment )</tt>. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>Old attachment. <tt>null</tt> if it is new.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getAttribute(java.lang.Object)"><!-- --></A><H3> |
| getAttribute</H3> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>getAttribute</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key)</PRE> |
| <DL> |
| <DD>Returns the value of the user-defined attribute of this session. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>key</CODE> - the key of the attribute |
| <DT><B>Returns:</B><DD><tt>null</tt> if there is no attribute with the specified key</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getAttribute(java.lang.Object, java.lang.Object)"><!-- --></A><H3> |
| getAttribute</H3> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>getAttribute</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> defaultValue)</PRE> |
| <DL> |
| <DD>Returns the value of user defined attribute associated with the |
| specified key. If there's no such attribute, the specified default |
| value is associated with the specified key, and the default value is |
| returned. This method is same with the following code except that the |
| operation is performed atomically. |
| <pre> |
| if (containsAttribute(key)) { |
| return getAttribute(key); |
| } else { |
| setAttribute(key, defaultValue); |
| return defaultValue; |
| } |
| </pre> |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setAttribute(java.lang.Object, java.lang.Object)"><!-- --></A><H3> |
| setAttribute</H3> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>setAttribute</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> value)</PRE> |
| <DL> |
| <DD>Sets a user-defined attribute. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>key</CODE> - the key of the attribute<DD><CODE>value</CODE> - the value of the attribute |
| <DT><B>Returns:</B><DD>The old value of the attribute. <tt>null</tt> if it is new.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setAttribute(java.lang.Object)"><!-- --></A><H3> |
| setAttribute</H3> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>setAttribute</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key)</PRE> |
| <DL> |
| <DD>Sets a user defined attribute without a value. This is useful when |
| you just want to put a 'mark' attribute. Its value is set to |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Boolean.html?is-external=true#TRUE" title="class or interface in java.lang"><CODE>Boolean.TRUE</CODE></A>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>key</CODE> - the key of the attribute |
| <DT><B>Returns:</B><DD>The old value of the attribute. <tt>null</tt> if it is new.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setAttributeIfAbsent(java.lang.Object, java.lang.Object)"><!-- --></A><H3> |
| setAttributeIfAbsent</H3> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>setAttributeIfAbsent</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> value)</PRE> |
| <DL> |
| <DD>Sets a user defined attribute if the attribute with the specified key |
| is not set yet. This method is same with the following code except |
| that the operation is performed atomically. |
| <pre> |
| if (containsAttribute(key)) { |
| return getAttribute(key); |
| } else { |
| return setAttribute(key, value); |
| } |
| </pre> |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setAttributeIfAbsent(java.lang.Object)"><!-- --></A><H3> |
| setAttributeIfAbsent</H3> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>setAttributeIfAbsent</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key)</PRE> |
| <DL> |
| <DD>Sets a user defined attribute without a value if the attribute with |
| the specified key is not set yet. This is useful when you just want to |
| put a 'mark' attribute. Its value is set to <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Boolean.html?is-external=true#TRUE" title="class or interface in java.lang"><CODE>Boolean.TRUE</CODE></A>. |
| This method is same with the following code except that the operation |
| is performed atomically. |
| <pre> |
| if (containsAttribute(key)) { |
| return getAttribute(key); // might not always be Boolean.TRUE. |
| } else { |
| return setAttribute(key); |
| } |
| </pre> |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="removeAttribute(java.lang.Object)"><!-- --></A><H3> |
| removeAttribute</H3> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>removeAttribute</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key)</PRE> |
| <DL> |
| <DD>Removes a user-defined attribute with the specified key. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>The old value of the attribute. <tt>null</tt> if not found.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="removeAttribute(java.lang.Object, java.lang.Object)"><!-- --></A><H3> |
| removeAttribute</H3> |
| <PRE> |
| boolean <B>removeAttribute</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> value)</PRE> |
| <DL> |
| <DD>Removes a user defined attribute with the specified key if the current |
| attribute value is equal to the specified value. This method is same |
| with the following code except that the operation is performed |
| atomically. |
| <pre> |
| if (containsAttribute(key) && getAttribute(key).equals(value)) { |
| removeAttribute(key); |
| return true; |
| } else { |
| return false; |
| } |
| </pre> |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="replaceAttribute(java.lang.Object, java.lang.Object, java.lang.Object)"><!-- --></A><H3> |
| replaceAttribute</H3> |
| <PRE> |
| boolean <B>replaceAttribute</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> oldValue, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> newValue)</PRE> |
| <DL> |
| <DD>Replaces a user defined attribute with the specified key if the |
| value of the attribute is equals to the specified old value. |
| This method is same with the following code except that the operation |
| is performed atomically. |
| <pre> |
| if (containsAttribute(key) && getAttribute(key).equals(oldValue)) { |
| setAttribute(key, newValue); |
| return true; |
| } else { |
| return false; |
| } |
| </pre> |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="containsAttribute(java.lang.Object)"><!-- --></A><H3> |
| containsAttribute</H3> |
| <PRE> |
| boolean <B>containsAttribute</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> key)</PRE> |
| <DL> |
| <DD>Returns <tt>true</tt> if this session contains the attribute with |
| the specified <tt>key</tt>. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getAttributeKeys()"><!-- --></A><H3> |
| getAttributeKeys</H3> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A><<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>> <B>getAttributeKeys</B>()</PRE> |
| <DL> |
| <DD>Returns the set of keys of all user-defined attributes. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isConnected()"><!-- --></A><H3> |
| isConnected</H3> |
| <PRE> |
| boolean <B>isConnected</B>()</PRE> |
| <DL> |
| <DD>Returns <code>true</code> if this session is connected with remote peer. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isClosing()"><!-- --></A><H3> |
| isClosing</H3> |
| <PRE> |
| boolean <B>isClosing</B>()</PRE> |
| <DL> |
| <DD>Returns <code>true</tt> if and only if this session is being closed |
| (but not disconnected yet) or is closed. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getCloseFuture()"><!-- --></A><H3> |
| getCloseFuture</H3> |
| <PRE> |
| <A HREF="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future">CloseFuture</A> <B>getCloseFuture</B>()</PRE> |
| <DL> |
| <DD>Returns the <A HREF="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future"><CODE>CloseFuture</CODE></A> of this session. This method returns |
| the same instance whenever user calls it. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getRemoteAddress()"><!-- --></A><H3> |
| getRemoteAddress</H3> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A> <B>getRemoteAddress</B>()</PRE> |
| <DL> |
| <DD>Returns the socket address of remote peer. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getLocalAddress()"><!-- --></A><H3> |
| getLocalAddress</H3> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A> <B>getLocalAddress</B>()</PRE> |
| <DL> |
| <DD>Returns the socket address of local machine which is associated with this |
| session. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getServiceAddress()"><!-- --></A><H3> |
| getServiceAddress</H3> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A> <B>getServiceAddress</B>()</PRE> |
| <DL> |
| <DD>Returns the socket address of the <A HREF="../../../../../org/apache/mina/core/service/IoService.html" title="interface in org.apache.mina.core.service"><CODE>IoService</CODE></A> listens to to manage |
| this session. If this session is managed by <A HREF="../../../../../org/apache/mina/core/service/IoAcceptor.html" title="interface in org.apache.mina.core.service"><CODE>IoAcceptor</CODE></A>, it |
| returns the <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net"><CODE>SocketAddress</CODE></A> which is specified as a parameter of |
| <A HREF="../../../../../org/apache/mina/core/service/IoAcceptor.html#bind()"><CODE>IoAcceptor.bind()</CODE></A>. If this session is managed by |
| <A HREF="../../../../../org/apache/mina/core/service/IoConnector.html" title="interface in org.apache.mina.core.service"><CODE>IoConnector</CODE></A>, this method returns the same address with |
| that of <A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getRemoteAddress()"><CODE>getRemoteAddress()</CODE></A>. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setCurrentWriteRequest(org.apache.mina.core.write.WriteRequest)"><!-- --></A><H3> |
| setCurrentWriteRequest</H3> |
| <PRE> |
| void <B>setCurrentWriteRequest</B>(<A HREF="../../../../../org/apache/mina/core/write/WriteRequest.html" title="interface in org.apache.mina.core.write">WriteRequest</A> currentWriteRequest)</PRE> |
| <DL> |
| <DD>TODO setWriteRequestQueue. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>writeRequestQueue</CODE> - </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="suspendRead()"><!-- --></A><H3> |
| suspendRead</H3> |
| <PRE> |
| void <B>suspendRead</B>()</PRE> |
| <DL> |
| <DD>Suspends read operations for this session. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="suspendWrite()"><!-- --></A><H3> |
| suspendWrite</H3> |
| <PRE> |
| void <B>suspendWrite</B>()</PRE> |
| <DL> |
| <DD>Suspends write operations for this session. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="resumeRead()"><!-- --></A><H3> |
| resumeRead</H3> |
| <PRE> |
| void <B>resumeRead</B>()</PRE> |
| <DL> |
| <DD>Resumes read operations for this session. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="resumeWrite()"><!-- --></A><H3> |
| resumeWrite</H3> |
| <PRE> |
| void <B>resumeWrite</B>()</PRE> |
| <DL> |
| <DD>Resumes write operations for this session. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isReadSuspended()"><!-- --></A><H3> |
| isReadSuspended</H3> |
| <PRE> |
| boolean <B>isReadSuspended</B>()</PRE> |
| <DL> |
| <DD>Is read operation is suspended for this session. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD><code>true</code> if suspended</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isWriteSuspended()"><!-- --></A><H3> |
| isWriteSuspended</H3> |
| <PRE> |
| boolean <B>isWriteSuspended</B>()</PRE> |
| <DL> |
| <DD>Is write operation is suspended for this session. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD><code>true</code> if suspended</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="updateThroughput(long, boolean)"><!-- --></A><H3> |
| updateThroughput</H3> |
| <PRE> |
| void <B>updateThroughput</B>(long currentTime, |
| boolean force)</PRE> |
| <DL> |
| <DD>Update all statistical properties related with throughput assuming |
| the specified time is the current time. By default this method returns |
| silently without updating the throughput properties if they were |
| calculated already within last |
| <A HREF="../../../../../org/apache/mina/core/session/IoSessionConfig.html#getThroughputCalculationInterval()"><CODE>calculation interval</CODE></A>. |
| If, however, <tt>force</tt> is specified as <tt>true</tt>, this method |
| updates the throughput properties immediately. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>currentTime</CODE> - the current time in milliseconds</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getReadBytes()"><!-- --></A><H3> |
| getReadBytes</H3> |
| <PRE> |
| long <B>getReadBytes</B>()</PRE> |
| <DL> |
| <DD>Returns the total number of bytes which were read from this session. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getWrittenBytes()"><!-- --></A><H3> |
| getWrittenBytes</H3> |
| <PRE> |
| long <B>getWrittenBytes</B>()</PRE> |
| <DL> |
| <DD>Returns the total number of bytes which were written to this session. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getReadMessages()"><!-- --></A><H3> |
| getReadMessages</H3> |
| <PRE> |
| long <B>getReadMessages</B>()</PRE> |
| <DL> |
| <DD>Returns the total number of messages which were read and decoded from this session. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getWrittenMessages()"><!-- --></A><H3> |
| getWrittenMessages</H3> |
| <PRE> |
| long <B>getWrittenMessages</B>()</PRE> |
| <DL> |
| <DD>Returns the total number of messages which were written and encoded by this session. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getReadBytesThroughput()"><!-- --></A><H3> |
| getReadBytesThroughput</H3> |
| <PRE> |
| double <B>getReadBytesThroughput</B>()</PRE> |
| <DL> |
| <DD>Returns the number of read bytes per second. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getWrittenBytesThroughput()"><!-- --></A><H3> |
| getWrittenBytesThroughput</H3> |
| <PRE> |
| double <B>getWrittenBytesThroughput</B>()</PRE> |
| <DL> |
| <DD>Returns the number of written bytes per second. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getReadMessagesThroughput()"><!-- --></A><H3> |
| getReadMessagesThroughput</H3> |
| <PRE> |
| double <B>getReadMessagesThroughput</B>()</PRE> |
| <DL> |
| <DD>Returns the number of read messages per second. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getWrittenMessagesThroughput()"><!-- --></A><H3> |
| getWrittenMessagesThroughput</H3> |
| <PRE> |
| double <B>getWrittenMessagesThroughput</B>()</PRE> |
| <DL> |
| <DD>Returns the number of written messages per second. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getScheduledWriteMessages()"><!-- --></A><H3> |
| getScheduledWriteMessages</H3> |
| <PRE> |
| int <B>getScheduledWriteMessages</B>()</PRE> |
| <DL> |
| <DD>Returns the number of messages which are scheduled to be written to this session. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getScheduledWriteBytes()"><!-- --></A><H3> |
| getScheduledWriteBytes</H3> |
| <PRE> |
| long <B>getScheduledWriteBytes</B>()</PRE> |
| <DL> |
| <DD>Returns the number of bytes which are scheduled to be written to this |
| session. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getCurrentWriteMessage()"><!-- --></A><H3> |
| getCurrentWriteMessage</H3> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>getCurrentWriteMessage</B>()</PRE> |
| <DL> |
| <DD>Returns the message which is being written by <A HREF="../../../../../org/apache/mina/core/service/IoService.html" title="interface in org.apache.mina.core.service"><CODE>IoService</CODE></A>. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD><tt>null</tt> if and if only no message is being written</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getCurrentWriteRequest()"><!-- --></A><H3> |
| getCurrentWriteRequest</H3> |
| <PRE> |
| <A HREF="../../../../../org/apache/mina/core/write/WriteRequest.html" title="interface in org.apache.mina.core.write">WriteRequest</A> <B>getCurrentWriteRequest</B>()</PRE> |
| <DL> |
| <DD>Returns the <A HREF="../../../../../org/apache/mina/core/write/WriteRequest.html" title="interface in org.apache.mina.core.write"><CODE>WriteRequest</CODE></A> which is being processed by |
| <A HREF="../../../../../org/apache/mina/core/service/IoService.html" title="interface in org.apache.mina.core.service"><CODE>IoService</CODE></A>. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD><tt>null</tt> if and if only no message is being written</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getCreationTime()"><!-- --></A><H3> |
| getCreationTime</H3> |
| <PRE> |
| long <B>getCreationTime</B>()</PRE> |
| <DL> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the session's creation time in milliseconds</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getLastIoTime()"><!-- --></A><H3> |
| getLastIoTime</H3> |
| <PRE> |
| long <B>getLastIoTime</B>()</PRE> |
| <DL> |
| <DD>Returns the time in millis when I/O occurred lastly. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getLastReadTime()"><!-- --></A><H3> |
| getLastReadTime</H3> |
| <PRE> |
| long <B>getLastReadTime</B>()</PRE> |
| <DL> |
| <DD>Returns the time in millis when read operation occurred lastly. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getLastWriteTime()"><!-- --></A><H3> |
| getLastWriteTime</H3> |
| <PRE> |
| long <B>getLastWriteTime</B>()</PRE> |
| <DL> |
| <DD>Returns the time in millis when write operation occurred lastly. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isIdle(org.apache.mina.core.session.IdleStatus)"><!-- --></A><H3> |
| isIdle</H3> |
| <PRE> |
| boolean <B>isIdle</B>(<A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session">IdleStatus</A> status)</PRE> |
| <DL> |
| <DD>Returns <code>true</code> if this session is idle for the specified |
| <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session"><CODE>IdleStatus</CODE></A>. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isReaderIdle()"><!-- --></A><H3> |
| isReaderIdle</H3> |
| <PRE> |
| boolean <B>isReaderIdle</B>()</PRE> |
| <DL> |
| <DD>Returns <code>true</code> if this session is <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#READER_IDLE"><CODE>IdleStatus.READER_IDLE</CODE></A>. |
| <P> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#isIdle(org.apache.mina.core.session.IdleStatus)"><CODE>isIdle(IdleStatus)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isWriterIdle()"><!-- --></A><H3> |
| isWriterIdle</H3> |
| <PRE> |
| boolean <B>isWriterIdle</B>()</PRE> |
| <DL> |
| <DD>Returns <code>true</code> if this session is <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#WRITER_IDLE"><CODE>IdleStatus.WRITER_IDLE</CODE></A>. |
| <P> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#isIdle(org.apache.mina.core.session.IdleStatus)"><CODE>isIdle(IdleStatus)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isBothIdle()"><!-- --></A><H3> |
| isBothIdle</H3> |
| <PRE> |
| boolean <B>isBothIdle</B>()</PRE> |
| <DL> |
| <DD>Returns <code>true</code> if this session is <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#BOTH_IDLE"><CODE>IdleStatus.BOTH_IDLE</CODE></A>. |
| <P> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#isIdle(org.apache.mina.core.session.IdleStatus)"><CODE>isIdle(IdleStatus)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getIdleCount(org.apache.mina.core.session.IdleStatus)"><!-- --></A><H3> |
| getIdleCount</H3> |
| <PRE> |
| int <B>getIdleCount</B>(<A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session">IdleStatus</A> status)</PRE> |
| <DL> |
| <DD>Returns the number of the fired continuous <tt>sessionIdle</tt> events |
| for the specified <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session"><CODE>IdleStatus</CODE></A>. |
| <p/> |
| If <tt>sessionIdle</tt> event is fired first after some time after I/O, |
| <tt>idleCount</tt> becomes <tt>1</tt>. <tt>idleCount</tt> resets to |
| <tt>0</tt> if any I/O occurs again, otherwise it increases to |
| <tt>2</tt> and so on if <tt>sessionIdle</tt> event is fired again without |
| any I/O between two (or more) <tt>sessionIdle</tt> events. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getReaderIdleCount()"><!-- --></A><H3> |
| getReaderIdleCount</H3> |
| <PRE> |
| int <B>getReaderIdleCount</B>()</PRE> |
| <DL> |
| <DD>Returns the number of the fired continuous <tt>sessionIdle</tt> events |
| for <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#READER_IDLE"><CODE>IdleStatus.READER_IDLE</CODE></A>. |
| <P> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getIdleCount(org.apache.mina.core.session.IdleStatus)"><CODE>getIdleCount(IdleStatus)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getWriterIdleCount()"><!-- --></A><H3> |
| getWriterIdleCount</H3> |
| <PRE> |
| int <B>getWriterIdleCount</B>()</PRE> |
| <DL> |
| <DD>Returns the number of the fired continuous <tt>sessionIdle</tt> events |
| for <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#WRITER_IDLE"><CODE>IdleStatus.WRITER_IDLE</CODE></A>. |
| <P> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getIdleCount(org.apache.mina.core.session.IdleStatus)"><CODE>getIdleCount(IdleStatus)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getBothIdleCount()"><!-- --></A><H3> |
| getBothIdleCount</H3> |
| <PRE> |
| int <B>getBothIdleCount</B>()</PRE> |
| <DL> |
| <DD>Returns the number of the fired continuous <tt>sessionIdle</tt> events |
| for <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#BOTH_IDLE"><CODE>IdleStatus.BOTH_IDLE</CODE></A>. |
| <P> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getIdleCount(org.apache.mina.core.session.IdleStatus)"><CODE>getIdleCount(IdleStatus)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getLastIdleTime(org.apache.mina.core.session.IdleStatus)"><!-- --></A><H3> |
| getLastIdleTime</H3> |
| <PRE> |
| long <B>getLastIdleTime</B>(<A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session">IdleStatus</A> status)</PRE> |
| <DL> |
| <DD>Returns the time in milliseconds when the last <tt>sessionIdle</tt> event |
| is fired for the specified <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session"><CODE>IdleStatus</CODE></A>. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getLastReaderIdleTime()"><!-- --></A><H3> |
| getLastReaderIdleTime</H3> |
| <PRE> |
| long <B>getLastReaderIdleTime</B>()</PRE> |
| <DL> |
| <DD>Returns the time in milliseconds when the last <tt>sessionIdle</tt> event |
| is fired for <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#READER_IDLE"><CODE>IdleStatus.READER_IDLE</CODE></A>. |
| <P> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getLastIdleTime(org.apache.mina.core.session.IdleStatus)"><CODE>getLastIdleTime(IdleStatus)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getLastWriterIdleTime()"><!-- --></A><H3> |
| getLastWriterIdleTime</H3> |
| <PRE> |
| long <B>getLastWriterIdleTime</B>()</PRE> |
| <DL> |
| <DD>Returns the time in milliseconds when the last <tt>sessionIdle</tt> event |
| is fired for <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#WRITER_IDLE"><CODE>IdleStatus.WRITER_IDLE</CODE></A>. |
| <P> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getLastIdleTime(org.apache.mina.core.session.IdleStatus)"><CODE>getLastIdleTime(IdleStatus)</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getLastBothIdleTime()"><!-- --></A><H3> |
| getLastBothIdleTime</H3> |
| <PRE> |
| long <B>getLastBothIdleTime</B>()</PRE> |
| <DL> |
| <DD>Returns the time in milliseconds when the last <tt>sessionIdle</tt> event |
| is fired for <A HREF="../../../../../org/apache/mina/core/session/IdleStatus.html#BOTH_IDLE"><CODE>IdleStatus.BOTH_IDLE</CODE></A>. |
| <P> |
| <DD><DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/mina/core/session/IoSession.html#getLastIdleTime(org.apache.mina.core.session.IdleStatus)"><CODE>getLastIdleTime(IdleStatus)</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/IoSession.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/core/session/IoEventType.html" title="enum in org.apache.mina.core.session"><B>PREV CLASS</B></A> |
| <A HREF="../../../../../org/apache/mina/core/session/IoSessionAttributeMap.html" title="interface in org.apache.mina.core.session"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../index.html?org/apache/mina/core/session/IoSession.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="IoSession.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 | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| Copyright © 2004-2012 <a href="http://mina.apache.org/">Apache MINA Project</a>. All Rights Reserved. |
| </BODY> |
| </HTML> |