blob: 49ddfb364146e641508237ac6fdfbcd54fe8ce8a [file] [log] [blame]
<!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.5.0_05) on Thu Dec 08 16:09:30 KST 2005 -->
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>
IoSession (MINA 0.9.0 API)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.mina.common.IoSession interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="IoSession (MINA 0.9.0 API)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= 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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/IoSession.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/mina/common/IoHandlerAdapter.html" title="class in org.apache.mina.common"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/mina/common/IoSessionManager.html" title="interface in org.apache.mina.common"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/mina/common/IoSession.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="IoSession.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.mina.common</FONT>
<BR>
Interface IoSession</H2>
<DL>
<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../org/apache/mina/transport/socket/nio/DatagramSession.html" title="interface in org.apache.mina.transport.socket.nio">DatagramSession</A>, <A HREF="../../../../org/apache/mina/transport/socket/nio/SocketSession.html" title="interface in org.apache.mina.transport.socket.nio">SocketSession</A>, <A HREF="../../../../org/apache/mina/transport/vmpipe/VmPipeSession.html" title="interface in org.apache.mina.transport.vmpipe">VmPipeSession</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>IoSession</B></DL>
</PRE>
<P>
A handle which represents connection between two endpoints regardless of
transport types.
<p>
<A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common"><CODE>IoSession</CODE></A> provides user-defined attributes. User-defined attributes
are application-specific data which is 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.
<h3>Adjusting Transport Type Specific Properties</h3>
<p>
You can simply downcast the session to an appropriate subclass.
</p>
<h3>Thread Safety</h3>
<p>
<A HREF="../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common"><CODE>IoSession</CODE></A> is thread-safe. But please note that performing
more than one <A HREF="../../../../org/apache/mina/common/IoSession.html#write(java.lang.Object)"><CODE>write(Object)</CODE></A> calls at the same time will
cause the <A HREF="../../../../org/apache/mina/common/IoFilter.html#filterWrite(org.apache.mina.common.IoFilter.NextFilter, org.apache.mina.common.IoSession, org.apache.mina.common.IoFilter.WriteRequest)"><CODE>IoFilter.filterWrite(IoFilter.NextFilter, IoSession, IoFilter.WriteRequest)</CODE></A>
is executed simnutaneously, and therefore you have to make sure the
<A HREF="../../../../org/apache/mina/common/IoFilter.html" title="interface in org.apache.mina.common"><CODE>IoFilter</CODE></A> implementations you're using are thread-safe, too.
</p>
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Rev: 355016 $, $Date: 2005-12-08 16:00:30 +0900 (Thu, 08 Dec 2005) $</DD>
<DT><B>Author:</B></DT>
<DD>The Apache Directory Project (dev@directory.apache.org)</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>&nbsp;<A HREF="../../../../org/apache/mina/common/CloseFuture.html" title="class in org.apache.mina.common">CloseFuture</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#close()">close</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes this session immediately.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#containsAttribute(java.lang.String)">containsAttribute</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getAttachment()">getAttachment</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an attachment of this session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getAttribute(java.lang.String)">getAttribute</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of user-defined attribute of this session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getAttributeKeys()">getAttributeKeys</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../../../org/apache/mina/common/CloseFuture.html" title="class in org.apache.mina.common">CloseFuture</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getCloseFuture()">getCloseFuture</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <A HREF="../../../../org/apache/mina/common/CloseFuture.html" title="class in org.apache.mina.common"><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>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getCreationTime()">getCreationTime</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the time in millis when this session is created.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/mina/common/IoFilterChain.html" title="interface in org.apache.mina.common">IoFilterChain</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getFilterChain()">getFilterChain</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the filter chain that only affects this session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/mina/common/IoHandler.html" title="interface in org.apache.mina.common">IoHandler</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getHandler()">getHandler</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <A HREF="../../../../org/apache/mina/common/IoHandler.html" title="interface in org.apache.mina.common"><CODE>IoHandler</CODE></A> which handles this session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getIdleCount(org.apache.mina.common.IdleStatus)">getIdleCount</A></B>(<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of the fired continuous <tt>sessionIdle</tt> events
for the specified <A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common"><CODE>IdleStatus</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getIdleTime(org.apache.mina.common.IdleStatus)">getIdleTime</A></B>(<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns idle time for the specified type of idleness in seconds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getIdleTimeInMillis(org.apache.mina.common.IdleStatus)">getIdleTimeInMillis</A></B>(<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns idle time for the specified type of idleness in milliseconds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getLastIdleTime(org.apache.mina.common.IdleStatus)">getLastIdleTime</A></B>(<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the time in millis when the last <tt>sessionIdle</tt> event
is fired for the specified <A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common"><CODE>IdleStatus</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getLastIoTime()">getLastIoTime</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getLastReadTime()">getLastReadTime</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getLastWriteTime()">getLastWriteTime</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/SocketAddress.html" title="class or interface in java.net">SocketAddress</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getLocalAddress()">getLocalAddress</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../../../org/apache/mina/common/IoSessionManager.html" title="interface in org.apache.mina.common">IoSessionManager</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getManager()">getManager</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <A HREF="../../../../org/apache/mina/common/IoSessionManager.html" title="interface in org.apache.mina.common"><CODE>IoSessionManager</CODE></A> which manages this session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getReadBytes()">getReadBytes</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/SocketAddress.html" title="class or interface in java.net">SocketAddress</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getRemoteAddress()">getRemoteAddress</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getScheduledWriteRequests()">getScheduledWriteRequests</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of write requests 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>&nbsp;<A HREF="../../../../org/apache/mina/common/TrafficMask.html" title="class in org.apache.mina.common">TrafficMask</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getTrafficMask()">getTrafficMask</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current <A HREF="../../../../org/apache/mina/common/TrafficMask.html" title="class in org.apache.mina.common"><CODE>TrafficMask</CODE></A> of this session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/mina/common/TransportType.html" title="class in org.apache.mina.common">TransportType</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getTransportType()">getTransportType</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns transport type of this session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getWriteTimeout()">getWriteTimeout</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns write timeout in seconds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getWriteTimeoutInMillis()">getWriteTimeoutInMillis</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns write timeout in milliseconds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getWrittenBytes()">getWrittenBytes</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#getWrittenWriteRequests()">getWrittenWriteRequests</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the total number of write requests which were written to this session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#isClosing()">isClosing</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#isConnected()">isConnected</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#isIdle(org.apache.mina.common.IdleStatus)">isIdle</A></B>(<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if this session is idle for the specified
<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common"><CODE>IdleStatus</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#removeAttribute(java.lang.String)">removeAttribute</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#resumeRead()">resumeRead</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A shortcut method for <A HREF="../../../../org/apache/mina/common/IoSession.html#setTrafficMask(org.apache.mina.common.TrafficMask)"><CODE>setTrafficMask(TrafficMask)</CODE></A> that
resumes read operations for this session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#resumeWrite()">resumeWrite</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A shortcut method for <A HREF="../../../../org/apache/mina/common/IoSession.html#setTrafficMask(org.apache.mina.common.TrafficMask)"><CODE>setTrafficMask(TrafficMask)</CODE></A> that
resumes write operations for this session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#setAttachment(java.lang.Object)">setAttachment</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;attachment)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets an attachment of this session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#setAttribute(java.lang.String)">setAttribute</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#setAttribute(java.lang.String, java.lang.Object)">setAttribute</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a user-defined attribute.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#setIdleTime(org.apache.mina.common.IdleStatus, int)">setIdleTime</A></B>(<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status,
int&nbsp;idleTime)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets idle time for the specified type of idleness in seconds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#setTrafficMask(org.apache.mina.common.TrafficMask)">setTrafficMask</A></B>(<A HREF="../../../../org/apache/mina/common/TrafficMask.html" title="class in org.apache.mina.common">TrafficMask</A>&nbsp;trafficMask)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the <A HREF="../../../../org/apache/mina/common/TrafficMask.html" title="class in org.apache.mina.common"><CODE>TrafficMask</CODE></A> of this session which will result
the parent <A HREF="../../../../org/apache/mina/common/IoSessionManager.html" title="interface in org.apache.mina.common"><CODE>IoSessionManager</CODE></A> to start to control the traffic
of this session immediately.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#setWriteTimeout(int)">setWriteTimeout</A></B>(int&nbsp;writeTimeout)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets write timeout in seconds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#suspendRead()">suspendRead</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A shortcut method for <A HREF="../../../../org/apache/mina/common/IoSession.html#setTrafficMask(org.apache.mina.common.TrafficMask)"><CODE>setTrafficMask(TrafficMask)</CODE></A> that
suspends read operations for this session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#suspendWrite()">suspendWrite</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A shortcut method for <A HREF="../../../../org/apache/mina/common/IoSession.html#setTrafficMask(org.apache.mina.common.TrafficMask)"><CODE>setTrafficMask(TrafficMask)</CODE></A> that
suspends write operations for this session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/mina/common/WriteFuture.html" title="class in org.apache.mina.common">WriteFuture</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/IoSession.html#write(java.lang.Object)">write</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;message)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the specified <code>message</code> to remote peer.</TD>
</TR>
</TABLE>
&nbsp;
<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="getManager()"><!-- --></A><H3>
getManager</H3>
<PRE>
<A HREF="../../../../org/apache/mina/common/IoSessionManager.html" title="interface in org.apache.mina.common">IoSessionManager</A> <B>getManager</B>()</PRE>
<DL>
<DD>Returns the <A HREF="../../../../org/apache/mina/common/IoSessionManager.html" title="interface in org.apache.mina.common"><CODE>IoSessionManager</CODE></A> which manages this session.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getHandler()"><!-- --></A><H3>
getHandler</H3>
<PRE>
<A HREF="../../../../org/apache/mina/common/IoHandler.html" title="interface in org.apache.mina.common">IoHandler</A> <B>getHandler</B>()</PRE>
<DL>
<DD>Returns the <A HREF="../../../../org/apache/mina/common/IoHandler.html" title="interface in org.apache.mina.common"><CODE>IoHandler</CODE></A> which handles this session.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getFilterChain()"><!-- --></A><H3>
getFilterChain</H3>
<PRE>
<A HREF="../../../../org/apache/mina/common/IoFilterChain.html" title="interface in org.apache.mina.common">IoFilterChain</A> <B>getFilterChain</B>()</PRE>
<DL>
<DD>Returns the filter chain that only affects this session.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="write(java.lang.Object)"><!-- --></A><H3>
write</H3>
<PRE>
<A HREF="../../../../org/apache/mina/common/WriteFuture.html" title="class in org.apache.mina.common">WriteFuture</A> <B>write</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;message)</PRE>
<DL>
<DD>Writes the specified <code>message</code> to remote peer. This
operation is asynchronous; <A HREF="../../../../org/apache/mina/common/IoHandler.html#messageSent(org.apache.mina.common.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 ait for the returned <A HREF="../../../../org/apache/mina/common/WriteFuture.html" title="class in org.apache.mina.common"><CODE>WriteFuture</CODE></A> if you want
to wait for the session actually closed.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="close()"><!-- --></A><H3>
close</H3>
<PRE>
<A HREF="../../../../org/apache/mina/common/CloseFuture.html" title="class in org.apache.mina.common">CloseFuture</A> <B>close</B>()</PRE>
<DL>
<DD>Closes this session immediately. This operation is asynthronous.
Wait for the returned <A HREF="../../../../org/apache/mina/common/CloseFuture.html" title="class in org.apache.mina.common"><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>
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getAttachment</B>()</PRE>
<DL>
<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>
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>setAttachment</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;attachment)</PRE>
<DL>
<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.String)"><!-- --></A><H3>
getAttribute</H3>
<PRE>
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getAttribute</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;key)</PRE>
<DL>
<DD>Returns the value of 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="setAttribute(java.lang.String, java.lang.Object)"><!-- --></A><H3>
setAttribute</H3>
<PRE>
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>setAttribute</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;key,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;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.String)"><!-- --></A><H3>
setAttribute</H3>
<PRE>
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>setAttribute</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;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://java.sun.com/j2se/1.5.0/docs/api/java/lang/Boolean.html#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="removeAttribute(java.lang.String)"><!-- --></A><H3>
removeAttribute</H3>
<PRE>
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>removeAttribute</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;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="containsAttribute(java.lang.String)"><!-- --></A><H3>
containsAttribute</H3>
<PRE>
boolean <B>containsAttribute</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;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://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</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="getTransportType()"><!-- --></A><H3>
getTransportType</H3>
<PRE>
<A HREF="../../../../org/apache/mina/common/TransportType.html" title="class in org.apache.mina.common">TransportType</A> <B>getTransportType</B>()</PRE>
<DL>
<DD>Returns transport type of this session.
<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/common/CloseFuture.html" title="class in org.apache.mina.common">CloseFuture</A> <B>getCloseFuture</B>()</PRE>
<DL>
<DD>Returns the <A HREF="../../../../org/apache/mina/common/CloseFuture.html" title="class in org.apache.mina.common"><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://java.sun.com/j2se/1.5.0/docs/api/java/net/SocketAddress.html" 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://java.sun.com/j2se/1.5.0/docs/api/java/net/SocketAddress.html" 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="getIdleTime(org.apache.mina.common.IdleStatus)"><!-- --></A><H3>
getIdleTime</H3>
<PRE>
int <B>getIdleTime</B>(<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status)</PRE>
<DL>
<DD>Returns idle time for the specified type of idleness in seconds.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getIdleTimeInMillis(org.apache.mina.common.IdleStatus)"><!-- --></A><H3>
getIdleTimeInMillis</H3>
<PRE>
long <B>getIdleTimeInMillis</B>(<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status)</PRE>
<DL>
<DD>Returns idle time for the specified type of idleness in milliseconds.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setIdleTime(org.apache.mina.common.IdleStatus, int)"><!-- --></A><H3>
setIdleTime</H3>
<PRE>
void <B>setIdleTime</B>(<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status,
int&nbsp;idleTime)</PRE>
<DL>
<DD>Sets idle time for the specified type of idleness in seconds.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getWriteTimeout()"><!-- --></A><H3>
getWriteTimeout</H3>
<PRE>
int <B>getWriteTimeout</B>()</PRE>
<DL>
<DD>Returns write timeout in seconds.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getWriteTimeoutInMillis()"><!-- --></A><H3>
getWriteTimeoutInMillis</H3>
<PRE>
long <B>getWriteTimeoutInMillis</B>()</PRE>
<DL>
<DD>Returns write timeout in milliseconds.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setWriteTimeout(int)"><!-- --></A><H3>
setWriteTimeout</H3>
<PRE>
void <B>setWriteTimeout</B>(int&nbsp;writeTimeout)</PRE>
<DL>
<DD>Sets write timeout in seconds.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getTrafficMask()"><!-- --></A><H3>
getTrafficMask</H3>
<PRE>
<A HREF="../../../../org/apache/mina/common/TrafficMask.html" title="class in org.apache.mina.common">TrafficMask</A> <B>getTrafficMask</B>()</PRE>
<DL>
<DD>Returns the current <A HREF="../../../../org/apache/mina/common/TrafficMask.html" title="class in org.apache.mina.common"><CODE>TrafficMask</CODE></A> of this session.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setTrafficMask(org.apache.mina.common.TrafficMask)"><!-- --></A><H3>
setTrafficMask</H3>
<PRE>
void <B>setTrafficMask</B>(<A HREF="../../../../org/apache/mina/common/TrafficMask.html" title="class in org.apache.mina.common">TrafficMask</A>&nbsp;trafficMask)</PRE>
<DL>
<DD>Sets the <A HREF="../../../../org/apache/mina/common/TrafficMask.html" title="class in org.apache.mina.common"><CODE>TrafficMask</CODE></A> of this session which will result
the parent <A HREF="../../../../org/apache/mina/common/IoSessionManager.html" title="interface in org.apache.mina.common"><CODE>IoSessionManager</CODE></A> to start to control the traffic
of this session immediately.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="suspendRead()"><!-- --></A><H3>
suspendRead</H3>
<PRE>
void <B>suspendRead</B>()</PRE>
<DL>
<DD>A shortcut method for <A HREF="../../../../org/apache/mina/common/IoSession.html#setTrafficMask(org.apache.mina.common.TrafficMask)"><CODE>setTrafficMask(TrafficMask)</CODE></A> that
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>A shortcut method for <A HREF="../../../../org/apache/mina/common/IoSession.html#setTrafficMask(org.apache.mina.common.TrafficMask)"><CODE>setTrafficMask(TrafficMask)</CODE></A> that
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>A shortcut method for <A HREF="../../../../org/apache/mina/common/IoSession.html#setTrafficMask(org.apache.mina.common.TrafficMask)"><CODE>setTrafficMask(TrafficMask)</CODE></A> that
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>A shortcut method for <A HREF="../../../../org/apache/mina/common/IoSession.html#setTrafficMask(org.apache.mina.common.TrafficMask)"><CODE>setTrafficMask(TrafficMask)</CODE></A> that
resumes write operations for this session.
<P>
<DD><DL>
</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="getWrittenWriteRequests()"><!-- --></A><H3>
getWrittenWriteRequests</H3>
<PRE>
long <B>getWrittenWriteRequests</B>()</PRE>
<DL>
<DD>Returns the total number of write requests which were written to this session.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getScheduledWriteRequests()"><!-- --></A><H3>
getScheduledWriteRequests</H3>
<PRE>
int <B>getScheduledWriteRequests</B>()</PRE>
<DL>
<DD>Returns the number of write requests which are scheduled to be written
to this session.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getCreationTime()"><!-- --></A><H3>
getCreationTime</H3>
<PRE>
long <B>getCreationTime</B>()</PRE>
<DL>
<DD>Returns the time in millis when this session is created.
<P>
<DD><DL>
</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.common.IdleStatus)"><!-- --></A><H3>
isIdle</H3>
<PRE>
boolean <B>isIdle</B>(<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status)</PRE>
<DL>
<DD>Returns <code>true</code> if this session is idle for the specified
<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common"><CODE>IdleStatus</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getIdleCount(org.apache.mina.common.IdleStatus)"><!-- --></A><H3>
getIdleCount</H3>
<PRE>
int <B>getIdleCount</B>(<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status)</PRE>
<DL>
<DD>Returns the number of the fired continuous <tt>sessionIdle</tt> events
for the specified <A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common"><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="getLastIdleTime(org.apache.mina.common.IdleStatus)"><!-- --></A><H3>
getLastIdleTime</H3>
<PRE>
long <B>getLastIdleTime</B>(<A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common">IdleStatus</A>&nbsp;status)</PRE>
<DL>
<DD>Returns the time in millis when the last <tt>sessionIdle</tt> event
is fired for the specified <A HREF="../../../../org/apache/mina/common/IdleStatus.html" title="class in org.apache.mina.common"><CODE>IdleStatus</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/IoSession.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/mina/common/IoHandlerAdapter.html" title="class in org.apache.mina.common"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/mina/common/IoSessionManager.html" title="interface in org.apache.mina.common"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/mina/common/IoSession.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="IoSession.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &copy; 2004-2005 . All Rights Reserved.
</BODY>
</HTML>