| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (version 1.7.0_07) on Sat Oct 06 02:25:55 CEST 2012 --> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>IoSession (Apache MINA 2.0.7 API)</title> |
| <meta name="date" content="2012-10-06"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="IoSession (Apache MINA 2.0.7 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/IoSession.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/mina/core/session/IoEventType.html" title="enum in org.apache.mina.core.session"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/mina/core/session/IoSessionAttributeMap.html" title="interface in org.apache.mina.core.session"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/mina/core/session/IoSession.html" target="_top">Frames</a></li> |
| <li><a href="IoSession.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.mina.core.session</div> |
| <h2 title="Interface IoSession" class="title">Interface IoSession</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Known Subinterfaces:</dt> |
| <dd><a href="../../../../../org/apache/mina/transport/serial/SerialSession.html" title="interface in org.apache.mina.transport.serial">SerialSession</a></dd> |
| </dl> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <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> |
| <br> |
| <pre>public interface <span class="strong">IoSession</span></pre> |
| <div class="block">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>.</div> |
| <dl><dt><span class="strong">Author:</span></dt> |
| <dd><a href="http://mina.apache.org">Apache MINA Project</a></dd></dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future">CloseFuture</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#close()">close</a></strong>()</code> |
| <div class="block"><strong>Deprecated.</strong> |
| <div class="block"><i>use <a href="../../../../../org/apache/mina/core/session/IoSession.html#close(boolean)"><code>close(boolean)</code></a></i></div> |
| </div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future">CloseFuture</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#close(boolean)">close</a></strong>(boolean immediately)</code> |
| <div class="block">Closes this session immediately or after all queued write requests |
| are flushed.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#containsAttribute(java.lang.Object)">containsAttribute</a></strong>(<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> |
| <div class="block">Returns <tt>true</tt> if this session contains the attribute with |
| the specified <tt>key</tt>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><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></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getAttachment()">getAttachment</a></strong>()</code> |
| <div class="block"><strong>Deprecated.</strong> |
| <div class="block"><i>Use <a href="../../../../../org/apache/mina/core/session/IoSession.html#getAttribute(java.lang.Object)"><code>getAttribute(Object)</code></a> instead.</i></div> |
| </div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><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></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getAttribute(java.lang.Object)">getAttribute</a></strong>(<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> |
| <div class="block">Returns the value of the user-defined attribute of this session.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><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></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getAttribute(java.lang.Object, java.lang.Object)">getAttribute</a></strong>(<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> |
| <div class="block">Returns the value of user defined attribute associated with the |
| specified key.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><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></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getAttributeKeys()">getAttributeKeys</a></strong>()</code> |
| <div class="block">Returns the set of keys of all user-defined attributes.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getBothIdleCount()">getBothIdleCount</a></strong>()</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future">CloseFuture</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getCloseFuture()">getCloseFuture</a></strong>()</code> |
| <div class="block">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.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mina/core/session/IoSessionConfig.html" title="interface in org.apache.mina.core.session">IoSessionConfig</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getConfig()">getConfig</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getCreationTime()">getCreationTime</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><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></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getCurrentWriteMessage()">getCurrentWriteMessage</a></strong>()</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mina/core/write/WriteRequest.html" title="interface in org.apache.mina.core.write">WriteRequest</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getCurrentWriteRequest()">getCurrentWriteRequest</a></strong>()</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mina/core/filterchain/IoFilterChain.html" title="interface in org.apache.mina.core.filterchain">IoFilterChain</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getFilterChain()">getFilterChain</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mina/core/service/IoHandler.html" title="interface in org.apache.mina.core.service">IoHandler</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getHandler()">getHandler</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getId()">getId</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getIdleCount(org.apache.mina.core.session.IdleStatus)">getIdleCount</a></strong>(<a href="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session">IdleStatus</a> status)</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getLastBothIdleTime()">getLastBothIdleTime</a></strong>()</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getLastIdleTime(org.apache.mina.core.session.IdleStatus)">getLastIdleTime</a></strong>(<a href="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session">IdleStatus</a> status)</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getLastIoTime()">getLastIoTime</a></strong>()</code> |
| <div class="block">Returns the time in millis when I/O occurred lastly.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getLastReaderIdleTime()">getLastReaderIdleTime</a></strong>()</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getLastReadTime()">getLastReadTime</a></strong>()</code> |
| <div class="block">Returns the time in millis when read operation occurred lastly.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getLastWriterIdleTime()">getLastWriterIdleTime</a></strong>()</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getLastWriteTime()">getLastWriteTime</a></strong>()</code> |
| <div class="block">Returns the time in millis when write operation occurred lastly.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><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></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getLocalAddress()">getLocalAddress</a></strong>()</code> |
| <div class="block">Returns the socket address of local machine which is associated with this |
| session.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getReadBytes()">getReadBytes</a></strong>()</code> |
| <div class="block">Returns the total number of bytes which were read from this session.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getReadBytesThroughput()">getReadBytesThroughput</a></strong>()</code> |
| <div class="block">Returns the number of read bytes per second.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getReaderIdleCount()">getReaderIdleCount</a></strong>()</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getReadMessages()">getReadMessages</a></strong>()</code> |
| <div class="block">Returns the total number of messages which were read and decoded from this session.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getReadMessagesThroughput()">getReadMessagesThroughput</a></strong>()</code> |
| <div class="block">Returns the number of read messages per second.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><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></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getRemoteAddress()">getRemoteAddress</a></strong>()</code> |
| <div class="block">Returns the socket address of remote peer.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getScheduledWriteBytes()">getScheduledWriteBytes</a></strong>()</code> |
| <div class="block">Returns the number of bytes which are scheduled to be written to this |
| session.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getScheduledWriteMessages()">getScheduledWriteMessages</a></strong>()</code> |
| <div class="block">Returns the number of messages which are scheduled to be written to this session.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mina/core/service/IoService.html" title="interface in org.apache.mina.core.service">IoService</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getService()">getService</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><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></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getServiceAddress()">getServiceAddress</a></strong>()</code> |
| <div class="block">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.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mina/core/service/TransportMetadata.html" title="interface in org.apache.mina.core.service">TransportMetadata</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getTransportMetadata()">getTransportMetadata</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mina/core/write/WriteRequestQueue.html" title="interface in org.apache.mina.core.write">WriteRequestQueue</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getWriteRequestQueue()">getWriteRequestQueue</a></strong>()</code> |
| <div class="block">TODO Add method documentation</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getWriterIdleCount()">getWriterIdleCount</a></strong>()</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getWrittenBytes()">getWrittenBytes</a></strong>()</code> |
| <div class="block">Returns the total number of bytes which were written to this session.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getWrittenBytesThroughput()">getWrittenBytesThroughput</a></strong>()</code> |
| <div class="block">Returns the number of written bytes per second.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getWrittenMessages()">getWrittenMessages</a></strong>()</code> |
| <div class="block">Returns the total number of messages which were written and encoded by this session.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#getWrittenMessagesThroughput()">getWrittenMessagesThroughput</a></strong>()</code> |
| <div class="block">Returns the number of written messages per second.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#isBothIdle()">isBothIdle</a></strong>()</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#isClosing()">isClosing</a></strong>()</code> |
| <div class="block">Returns <code>true</tt> if and only if this session is being closed |
| (but not disconnected yet) or is closed.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#isConnected()">isConnected</a></strong>()</code> |
| <div class="block">Returns <code>true</code> if this session is connected with remote peer.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#isIdle(org.apache.mina.core.session.IdleStatus)">isIdle</a></strong>(<a href="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session">IdleStatus</a> status)</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#isReaderIdle()">isReaderIdle</a></strong>()</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#isReadSuspended()">isReadSuspended</a></strong>()</code> |
| <div class="block">Is read operation is suspended for this session.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#isWriterIdle()">isWriterIdle</a></strong>()</code> |
| <div class="block">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>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#isWriteSuspended()">isWriteSuspended</a></strong>()</code> |
| <div class="block">Is write operation is suspended for this session.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mina/core/future/ReadFuture.html" title="interface in org.apache.mina.core.future">ReadFuture</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#read()">read</a></strong>()</code> |
| <div class="block">TODO This javadoc is wrong.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><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></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#removeAttribute(java.lang.Object)">removeAttribute</a></strong>(<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> |
| <div class="block">Removes a user-defined attribute with the specified key.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#removeAttribute(java.lang.Object, java.lang.Object)">removeAttribute</a></strong>(<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> |
| <div class="block">Removes a user defined attribute with the specified key if the current |
| attribute value is equal to the specified value.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#replaceAttribute(java.lang.Object, java.lang.Object, java.lang.Object)">replaceAttribute</a></strong>(<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> |
| <div class="block">Replaces a user defined attribute with the specified key if the |
| value of the attribute is equals to the specified old value.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#resumeRead()">resumeRead</a></strong>()</code> |
| <div class="block">Resumes read operations for this session.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#resumeWrite()">resumeWrite</a></strong>()</code> |
| <div class="block">Resumes write operations for this session.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><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></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#setAttachment(java.lang.Object)">setAttachment</a></strong>(<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> |
| <div class="block"><strong>Deprecated.</strong> |
| <div class="block"><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></div> |
| </div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><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></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#setAttribute(java.lang.Object)">setAttribute</a></strong>(<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> |
| <div class="block">Sets a user defined attribute without a value.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><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></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#setAttribute(java.lang.Object, java.lang.Object)">setAttribute</a></strong>(<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> |
| <div class="block">Sets a user-defined attribute.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><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></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#setAttributeIfAbsent(java.lang.Object)">setAttributeIfAbsent</a></strong>(<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> |
| <div class="block">Sets a user defined attribute without a value if the attribute with |
| the specified key is not set yet.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><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></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#setAttributeIfAbsent(java.lang.Object, java.lang.Object)">setAttributeIfAbsent</a></strong>(<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> |
| <div class="block">Sets a user defined attribute if the attribute with the specified key |
| is not set yet.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#setCurrentWriteRequest(org.apache.mina.core.write.WriteRequest)">setCurrentWriteRequest</a></strong>(<a href="../../../../../org/apache/mina/core/write/WriteRequest.html" title="interface in org.apache.mina.core.write">WriteRequest</a> currentWriteRequest)</code> |
| <div class="block">TODO setWriteRequestQueue.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#suspendRead()">suspendRead</a></strong>()</code> |
| <div class="block">Suspends read operations for this session.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#suspendWrite()">suspendWrite</a></strong>()</code> |
| <div class="block">Suspends write operations for this session.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#updateThroughput(long, boolean)">updateThroughput</a></strong>(long currentTime, |
| boolean force)</code> |
| <div class="block">Update all statistical properties related with throughput assuming |
| the specified time is the current time.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mina/core/future/WriteFuture.html" title="interface in org.apache.mina.core.future">WriteFuture</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#write(java.lang.Object)">write</a></strong>(<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> |
| <div class="block">Writes the specified <code>message</code> to remote peer.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/mina/core/future/WriteFuture.html" title="interface in org.apache.mina.core.future">WriteFuture</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/mina/core/session/IoSession.html#write(java.lang.Object, java.net.SocketAddress)">write</a></strong>(<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> |
| <div class="block">(Optional) Writes the specified <tt>message</tt> to the specified <tt>destination</tt>.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getId()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getId</h4> |
| <pre>long getId()</pre> |
| <dl><dt><span class="strong">Returns:</span></dt><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.</dd></dl> |
| </li> |
| </ul> |
| <a name="getService()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getService</h4> |
| <pre><a href="../../../../../org/apache/mina/core/service/IoService.html" title="interface in org.apache.mina.core.service">IoService</a> getService()</pre> |
| <dl><dt><span class="strong">Returns:</span></dt><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.</dd></dl> |
| </li> |
| </ul> |
| <a name="getHandler()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getHandler</h4> |
| <pre><a href="../../../../../org/apache/mina/core/service/IoHandler.html" title="interface in org.apache.mina.core.service">IoHandler</a> getHandler()</pre> |
| <dl><dt><span class="strong">Returns:</span></dt><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.</dd></dl> |
| </li> |
| </ul> |
| <a name="getConfig()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getConfig</h4> |
| <pre><a href="../../../../../org/apache/mina/core/session/IoSessionConfig.html" title="interface in org.apache.mina.core.session">IoSessionConfig</a> getConfig()</pre> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the configuration of this session.</dd></dl> |
| </li> |
| </ul> |
| <a name="getFilterChain()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFilterChain</h4> |
| <pre><a href="../../../../../org/apache/mina/core/filterchain/IoFilterChain.html" title="interface in org.apache.mina.core.filterchain">IoFilterChain</a> getFilterChain()</pre> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the filter chain that only affects this session.</dd></dl> |
| </li> |
| </ul> |
| <a name="getWriteRequestQueue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getWriteRequestQueue</h4> |
| <pre><a href="../../../../../org/apache/mina/core/write/WriteRequestQueue.html" title="interface in org.apache.mina.core.write">WriteRequestQueue</a> getWriteRequestQueue()</pre> |
| <div class="block">TODO Add method documentation</div> |
| </li> |
| </ul> |
| <a name="getTransportMetadata()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTransportMetadata</h4> |
| <pre><a href="../../../../../org/apache/mina/core/service/TransportMetadata.html" title="interface in org.apache.mina.core.service">TransportMetadata</a> getTransportMetadata()</pre> |
| <dl><dt><span class="strong">Returns:</span></dt><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.</dd></dl> |
| </li> |
| </ul> |
| <a name="read()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>read</h4> |
| <pre><a href="../../../../../org/apache/mina/core/future/ReadFuture.html" title="interface in org.apache.mina.core.future">ReadFuture</a> read()</pre> |
| <div class="block">TODO This javadoc is wrong. The return tag should be short.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><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>.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <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.</dd></dl> |
| </li> |
| </ul> |
| <a name="write(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>write</h4> |
| <pre><a href="../../../../../org/apache/mina/core/future/WriteFuture.html" title="interface in org.apache.mina.core.future">WriteFuture</a> write(<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> |
| <div class="block">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.</div> |
| </li> |
| </ul> |
| <a name="write(java.lang.Object, java.net.SocketAddress)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>write</h4> |
| <pre><a href="../../../../../org/apache/mina/core/future/WriteFuture.html" title="interface in org.apache.mina.core.future">WriteFuture</a> write(<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> |
| <div class="block">(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.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>destination</code> - <tt>null</tt> if you want the message sent to the |
| default remote address</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <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</dd></dl> |
| </li> |
| </ul> |
| <a name="close(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>close</h4> |
| <pre><a href="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future">CloseFuture</a> close(boolean immediately)</pre> |
| <div class="block">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.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><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>).</dd></dl> |
| </li> |
| </ul> |
| <a name="close()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>close</h4> |
| <pre><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> |
| <a href="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future">CloseFuture</a> close()</pre> |
| <div class="block"><span class="strong">Deprecated.</span> <i>use <a href="../../../../../org/apache/mina/core/session/IoSession.html#close(boolean)"><code>close(boolean)</code></a></i></div> |
| <div class="block">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.</div> |
| </li> |
| </ul> |
| <a name="getAttachment()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttachment</h4> |
| <pre><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> |
| <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> getAttachment()</pre> |
| <div class="block"><span class="strong">Deprecated.</span> <i>Use <a href="../../../../../org/apache/mina/core/session/IoSession.html#getAttribute(java.lang.Object)"><code>getAttribute(Object)</code></a> instead.</i></div> |
| <div class="block">Returns an attachment of this session. |
| This method is identical with <tt>getAttribute( "" )</tt>.</div> |
| </li> |
| </ul> |
| <a name="setAttachment(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAttachment</h4> |
| <pre><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> |
| <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> setAttachment(<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> |
| <div class="block"><span class="strong">Deprecated.</span> <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></div> |
| <div class="block">Sets an attachment of this session. |
| This method is identical with <tt>setAttribute( "", attachment )</tt>.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>Old attachment. <tt>null</tt> if it is new.</dd></dl> |
| </li> |
| </ul> |
| <a name="getAttribute(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttribute</h4> |
| <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> getAttribute(<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> |
| <div class="block">Returns the value of the user-defined attribute of this session.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key of the attribute</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><tt>null</tt> if there is no attribute with the specified key</dd></dl> |
| </li> |
| </ul> |
| <a name="getAttribute(java.lang.Object, java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttribute</h4> |
| <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> getAttribute(<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> |
| <div class="block">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></div> |
| </li> |
| </ul> |
| <a name="setAttribute(java.lang.Object, java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAttribute</h4> |
| <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> setAttribute(<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> |
| <div class="block">Sets a user-defined attribute.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key of the attribute</dd><dd><code>value</code> - the value of the attribute</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The old value of the attribute. <tt>null</tt> if it is new.</dd></dl> |
| </li> |
| </ul> |
| <a name="setAttribute(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAttribute</h4> |
| <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> setAttribute(<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> |
| <div class="block">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>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key of the attribute</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The old value of the attribute. <tt>null</tt> if it is new.</dd></dl> |
| </li> |
| </ul> |
| <a name="setAttributeIfAbsent(java.lang.Object, java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAttributeIfAbsent</h4> |
| <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> setAttributeIfAbsent(<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> |
| <div class="block">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></div> |
| </li> |
| </ul> |
| <a name="setAttributeIfAbsent(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAttributeIfAbsent</h4> |
| <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> setAttributeIfAbsent(<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> |
| <div class="block">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></div> |
| </li> |
| </ul> |
| <a name="removeAttribute(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>removeAttribute</h4> |
| <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> removeAttribute(<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> |
| <div class="block">Removes a user-defined attribute with the specified key.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>The old value of the attribute. <tt>null</tt> if not found.</dd></dl> |
| </li> |
| </ul> |
| <a name="removeAttribute(java.lang.Object, java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>removeAttribute</h4> |
| <pre>boolean removeAttribute(<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> |
| <div class="block">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></div> |
| </li> |
| </ul> |
| <a name="replaceAttribute(java.lang.Object, java.lang.Object, java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>replaceAttribute</h4> |
| <pre>boolean replaceAttribute(<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> |
| <div class="block">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></div> |
| </li> |
| </ul> |
| <a name="containsAttribute(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>containsAttribute</h4> |
| <pre>boolean containsAttribute(<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> |
| <div class="block">Returns <tt>true</tt> if this session contains the attribute with |
| the specified <tt>key</tt>.</div> |
| </li> |
| </ul> |
| <a name="getAttributeKeys()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttributeKeys</h4> |
| <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>> getAttributeKeys()</pre> |
| <div class="block">Returns the set of keys of all user-defined attributes.</div> |
| </li> |
| </ul> |
| <a name="isConnected()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isConnected</h4> |
| <pre>boolean isConnected()</pre> |
| <div class="block">Returns <code>true</code> if this session is connected with remote peer.</div> |
| </li> |
| </ul> |
| <a name="isClosing()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isClosing</h4> |
| <pre>boolean isClosing()</pre> |
| <div class="block">Returns <code>true</tt> if and only if this session is being closed |
| (but not disconnected yet) or is closed.</div> |
| </li> |
| </ul> |
| <a name="getCloseFuture()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCloseFuture</h4> |
| <pre><a href="../../../../../org/apache/mina/core/future/CloseFuture.html" title="interface in org.apache.mina.core.future">CloseFuture</a> getCloseFuture()</pre> |
| <div class="block">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.</div> |
| </li> |
| </ul> |
| <a name="getRemoteAddress()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRemoteAddress</h4> |
| <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> getRemoteAddress()</pre> |
| <div class="block">Returns the socket address of remote peer.</div> |
| </li> |
| </ul> |
| <a name="getLocalAddress()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLocalAddress</h4> |
| <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> getLocalAddress()</pre> |
| <div class="block">Returns the socket address of local machine which is associated with this |
| session.</div> |
| </li> |
| </ul> |
| <a name="getServiceAddress()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getServiceAddress</h4> |
| <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> getServiceAddress()</pre> |
| <div class="block">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>.</div> |
| </li> |
| </ul> |
| <a name="setCurrentWriteRequest(org.apache.mina.core.write.WriteRequest)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setCurrentWriteRequest</h4> |
| <pre>void setCurrentWriteRequest(<a href="../../../../../org/apache/mina/core/write/WriteRequest.html" title="interface in org.apache.mina.core.write">WriteRequest</a> currentWriteRequest)</pre> |
| <div class="block">TODO setWriteRequestQueue.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>writeRequestQueue</code> - </dd></dl> |
| </li> |
| </ul> |
| <a name="suspendRead()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>suspendRead</h4> |
| <pre>void suspendRead()</pre> |
| <div class="block">Suspends read operations for this session.</div> |
| </li> |
| </ul> |
| <a name="suspendWrite()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>suspendWrite</h4> |
| <pre>void suspendWrite()</pre> |
| <div class="block">Suspends write operations for this session.</div> |
| </li> |
| </ul> |
| <a name="resumeRead()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>resumeRead</h4> |
| <pre>void resumeRead()</pre> |
| <div class="block">Resumes read operations for this session.</div> |
| </li> |
| </ul> |
| <a name="resumeWrite()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>resumeWrite</h4> |
| <pre>void resumeWrite()</pre> |
| <div class="block">Resumes write operations for this session.</div> |
| </li> |
| </ul> |
| <a name="isReadSuspended()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isReadSuspended</h4> |
| <pre>boolean isReadSuspended()</pre> |
| <div class="block">Is read operation is suspended for this session.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if suspended</dd></dl> |
| </li> |
| </ul> |
| <a name="isWriteSuspended()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isWriteSuspended</h4> |
| <pre>boolean isWriteSuspended()</pre> |
| <div class="block">Is write operation is suspended for this session.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if suspended</dd></dl> |
| </li> |
| </ul> |
| <a name="updateThroughput(long, boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>updateThroughput</h4> |
| <pre>void updateThroughput(long currentTime, |
| boolean force)</pre> |
| <div class="block">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.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>currentTime</code> - the current time in milliseconds</dd></dl> |
| </li> |
| </ul> |
| <a name="getReadBytes()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getReadBytes</h4> |
| <pre>long getReadBytes()</pre> |
| <div class="block">Returns the total number of bytes which were read from this session.</div> |
| </li> |
| </ul> |
| <a name="getWrittenBytes()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getWrittenBytes</h4> |
| <pre>long getWrittenBytes()</pre> |
| <div class="block">Returns the total number of bytes which were written to this session.</div> |
| </li> |
| </ul> |
| <a name="getReadMessages()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getReadMessages</h4> |
| <pre>long getReadMessages()</pre> |
| <div class="block">Returns the total number of messages which were read and decoded from this session.</div> |
| </li> |
| </ul> |
| <a name="getWrittenMessages()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getWrittenMessages</h4> |
| <pre>long getWrittenMessages()</pre> |
| <div class="block">Returns the total number of messages which were written and encoded by this session.</div> |
| </li> |
| </ul> |
| <a name="getReadBytesThroughput()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getReadBytesThroughput</h4> |
| <pre>double getReadBytesThroughput()</pre> |
| <div class="block">Returns the number of read bytes per second.</div> |
| </li> |
| </ul> |
| <a name="getWrittenBytesThroughput()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getWrittenBytesThroughput</h4> |
| <pre>double getWrittenBytesThroughput()</pre> |
| <div class="block">Returns the number of written bytes per second.</div> |
| </li> |
| </ul> |
| <a name="getReadMessagesThroughput()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getReadMessagesThroughput</h4> |
| <pre>double getReadMessagesThroughput()</pre> |
| <div class="block">Returns the number of read messages per second.</div> |
| </li> |
| </ul> |
| <a name="getWrittenMessagesThroughput()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getWrittenMessagesThroughput</h4> |
| <pre>double getWrittenMessagesThroughput()</pre> |
| <div class="block">Returns the number of written messages per second.</div> |
| </li> |
| </ul> |
| <a name="getScheduledWriteMessages()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getScheduledWriteMessages</h4> |
| <pre>int getScheduledWriteMessages()</pre> |
| <div class="block">Returns the number of messages which are scheduled to be written to this session.</div> |
| </li> |
| </ul> |
| <a name="getScheduledWriteBytes()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getScheduledWriteBytes</h4> |
| <pre>long getScheduledWriteBytes()</pre> |
| <div class="block">Returns the number of bytes which are scheduled to be written to this |
| session.</div> |
| </li> |
| </ul> |
| <a name="getCurrentWriteMessage()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCurrentWriteMessage</h4> |
| <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> getCurrentWriteMessage()</pre> |
| <div class="block">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>.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd><tt>null</tt> if and if only no message is being written</dd></dl> |
| </li> |
| </ul> |
| <a name="getCurrentWriteRequest()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCurrentWriteRequest</h4> |
| <pre><a href="../../../../../org/apache/mina/core/write/WriteRequest.html" title="interface in org.apache.mina.core.write">WriteRequest</a> getCurrentWriteRequest()</pre> |
| <div class="block">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>.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd><tt>null</tt> if and if only no message is being written</dd></dl> |
| </li> |
| </ul> |
| <a name="getCreationTime()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCreationTime</h4> |
| <pre>long getCreationTime()</pre> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the session's creation time in milliseconds</dd></dl> |
| </li> |
| </ul> |
| <a name="getLastIoTime()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLastIoTime</h4> |
| <pre>long getLastIoTime()</pre> |
| <div class="block">Returns the time in millis when I/O occurred lastly.</div> |
| </li> |
| </ul> |
| <a name="getLastReadTime()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLastReadTime</h4> |
| <pre>long getLastReadTime()</pre> |
| <div class="block">Returns the time in millis when read operation occurred lastly.</div> |
| </li> |
| </ul> |
| <a name="getLastWriteTime()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLastWriteTime</h4> |
| <pre>long getLastWriteTime()</pre> |
| <div class="block">Returns the time in millis when write operation occurred lastly.</div> |
| </li> |
| </ul> |
| <a name="isIdle(org.apache.mina.core.session.IdleStatus)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isIdle</h4> |
| <pre>boolean isIdle(<a href="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session">IdleStatus</a> status)</pre> |
| <div class="block">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>.</div> |
| </li> |
| </ul> |
| <a name="isReaderIdle()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isReaderIdle</h4> |
| <pre>boolean isReaderIdle()</pre> |
| <div class="block">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>.</div> |
| <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/mina/core/session/IoSession.html#isIdle(org.apache.mina.core.session.IdleStatus)"><code>isIdle(IdleStatus)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="isWriterIdle()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isWriterIdle</h4> |
| <pre>boolean isWriterIdle()</pre> |
| <div class="block">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>.</div> |
| <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/mina/core/session/IoSession.html#isIdle(org.apache.mina.core.session.IdleStatus)"><code>isIdle(IdleStatus)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="isBothIdle()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isBothIdle</h4> |
| <pre>boolean isBothIdle()</pre> |
| <div class="block">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>.</div> |
| <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/mina/core/session/IoSession.html#isIdle(org.apache.mina.core.session.IdleStatus)"><code>isIdle(IdleStatus)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getIdleCount(org.apache.mina.core.session.IdleStatus)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getIdleCount</h4> |
| <pre>int getIdleCount(<a href="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session">IdleStatus</a> status)</pre> |
| <div class="block">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.</div> |
| </li> |
| </ul> |
| <a name="getReaderIdleCount()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getReaderIdleCount</h4> |
| <pre>int getReaderIdleCount()</pre> |
| <div class="block">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>.</div> |
| <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/mina/core/session/IoSession.html#getIdleCount(org.apache.mina.core.session.IdleStatus)"><code>getIdleCount(IdleStatus)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getWriterIdleCount()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getWriterIdleCount</h4> |
| <pre>int getWriterIdleCount()</pre> |
| <div class="block">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>.</div> |
| <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/mina/core/session/IoSession.html#getIdleCount(org.apache.mina.core.session.IdleStatus)"><code>getIdleCount(IdleStatus)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getBothIdleCount()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getBothIdleCount</h4> |
| <pre>int getBothIdleCount()</pre> |
| <div class="block">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>.</div> |
| <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/mina/core/session/IoSession.html#getIdleCount(org.apache.mina.core.session.IdleStatus)"><code>getIdleCount(IdleStatus)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getLastIdleTime(org.apache.mina.core.session.IdleStatus)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLastIdleTime</h4> |
| <pre>long getLastIdleTime(<a href="../../../../../org/apache/mina/core/session/IdleStatus.html" title="class in org.apache.mina.core.session">IdleStatus</a> status)</pre> |
| <div class="block">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>.</div> |
| </li> |
| </ul> |
| <a name="getLastReaderIdleTime()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLastReaderIdleTime</h4> |
| <pre>long getLastReaderIdleTime()</pre> |
| <div class="block">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>.</div> |
| <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/mina/core/session/IoSession.html#getLastIdleTime(org.apache.mina.core.session.IdleStatus)"><code>getLastIdleTime(IdleStatus)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getLastWriterIdleTime()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLastWriterIdleTime</h4> |
| <pre>long getLastWriterIdleTime()</pre> |
| <div class="block">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>.</div> |
| <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/mina/core/session/IoSession.html#getLastIdleTime(org.apache.mina.core.session.IdleStatus)"><code>getLastIdleTime(IdleStatus)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getLastBothIdleTime()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getLastBothIdleTime</h4> |
| <pre>long getLastBothIdleTime()</pre> |
| <div class="block">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>.</div> |
| <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/mina/core/session/IoSession.html#getLastIdleTime(org.apache.mina.core.session.IdleStatus)"><code>getLastIdleTime(IdleStatus)</code></a></dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/IoSession.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/mina/core/session/IoEventType.html" title="enum in org.apache.mina.core.session"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/mina/core/session/IoSessionAttributeMap.html" title="interface in org.apache.mina.core.session"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/mina/core/session/IoSession.html" target="_top">Frames</a></li> |
| <li><a href="IoSession.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2004-2012 <a href="http://mina.apache.org/">Apache MINA Project</a>. All Rights Reserved.</small></p> |
| </body> |
| </html> |