blob: 146180aaa3733c7a187e3f16aa470ac3d2c4ef12 [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_02) on Mon Jul 11 13:14:39 KST 2005 -->
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>
Session (MINA 0.7.3 API)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.mina.common.Session interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Session (MINA 0.7.3 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/Session.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/IdleStatus.html" title="class in org.apache.mina.common"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/mina/common/SessionConfig.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/Session.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Session.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 Session</H2>
<DL>
<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../org/apache/mina/io/IoSession.html" title="interface in org.apache.mina.io">IoSession</A>, <A HREF="../../../../org/apache/mina/protocol/ProtocolSession.html" title="interface in org.apache.mina.protocol">ProtocolSession</A></DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../org/apache/mina/common/BaseSession.html" title="class in org.apache.mina.common">BaseSession</A>, <A HREF="../../../../org/apache/mina/protocol/io/IoProtocolSession.html" title="class in org.apache.mina.protocol.io">IoProtocolSession</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>Session</B></DL>
</PRE>
<P>
A handle which represents connection between two endpoints regardless of
transport types.
<p>
Session 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.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Rev: 210062 $, $Date: 2005-07-11 12:52:38 +0900 $</DD>
<DT><B>Author:</B></DT>
<DD>Trustin Lee (trustin@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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/Session.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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/Session.html#close(boolean)">close</A></B>(boolean&nbsp;wait)</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;<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/Session.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/Session.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/Session.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/SessionConfig.html" title="interface in org.apache.mina.common">SessionConfig</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/Session.html#getConfig()">getConfig</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the configuration 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/Session.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/Session.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/Session.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/Session.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;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/Session.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/Session.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/Session.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/TransportType.html" title="class in org.apache.mina.common">TransportType</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/Session.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;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/mina/common/Session.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/Session.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/Session.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/Session.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/Session.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;<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/Session.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/Session.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>
</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="close()"><!-- --></A><H3>
close</H3>
<PRE>
void <B>close</B>()</PRE>
<DL>
<DD>Closes this session immediately. Calling method is identical with
calling <tt>close( false )</tt>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="close(boolean)"><!-- --></A><H3>
close</H3>
<PRE>
void <B>close</B>(boolean&nbsp;wait)</PRE>
<DL>
<DD>Closes this session immediately.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>wait</CODE> - <tt>true</tt> if you want to wait until closing process is
complete.</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="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="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="getConfig()"><!-- --></A><H3>
getConfig</H3>
<PRE>
<A HREF="../../../../org/apache/mina/common/SessionConfig.html" title="interface in org.apache.mina.common">SessionConfig</A> <B>getConfig</B>()</PRE>
<DL>
<DD>Returns the configuration of this session.
<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="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="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>
<!-- ========= 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/Session.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/IdleStatus.html" title="class in org.apache.mina.common"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/mina/common/SessionConfig.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/Session.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Session.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>