Author: trustin
Date: Thu Aug 2 22:53:44 2007
New Revision: 562343
URL: http://svn.apache.org/viewvc?view=rev&rev=562343
Log:
Fixed documentation errors in IoHandler (DIRMINA-413)
Modified:
mina/branches/1.0/core/src/main/java/org/apache/mina/common/IoHandler.java
mina/branches/1.1/core/src/main/java/org/apache/mina/common/IoHandler.java
mina/trunk/core/src/main/java/org/apache/mina/common/IoHandler.java
Modified:
mina/branches/1.0/core/src/main/java/org/apache/mina/common/IoHandler.java
URL:
http://svn.apache.org/viewvc/mina/branches/1.0/core/src/main/java/org/apache/mina/common/IoHandler.java?view=diff&rev=562343&r1=562342&r2=562343
==============================================================================
--- mina/branches/1.0/core/src/main/java/org/apache/mina/common/IoHandler.java
(original)
+++ mina/branches/1.0/core/src/main/java/org/apache/mina/common/IoHandler.java
Thu Aug 2 22:53:44 2007
@@ -22,41 +22,40 @@
import java.io.IOException;
/**
- * Handles all protocol events fired by MINA.
- * There are 6 event handler methods, and they are all invoked by MINA
- * automatically.
- * <p>
- * Please refer to
- * <a
href="../../../../../xref-examples/org/apache/mina/examples/reverser/ReverseIoHandler.html"><code>ReverseIoHandler</code></a>
- * example.
+ * Handles all I/O events fired by MINA.
*
- * @author The Apache Directory Project ([EMAIL PROTECTED])
+ * @author The Apache MINA Project ([EMAIL PROTECTED])
* @version $Rev$, $Date$
*
* @see IoHandlerAdapter
*/
public interface IoHandler {
/**
- * Invoked when the session is created. Initialize default socket
- * parameters and user-defined attributes here.
+ * Invoked from an I/O processor thread when a new connection has been
created.
+ * Because this method is supposed to be called from the same thread that
+ * handles I/O of multiple sessions, please implement this method to
perform
+ * tasks that consumes minimal amount of time such as socket parameter
+ * and user-defined session attribute initialization.
*/
void sessionCreated(IoSession session) throws Exception;
/**
- * Invoked when the connection is opened. This method is not invoked if
the
- * transport type is UDP.
+ * Invoked when a connection has been opened. This method is invoked after
+ * [EMAIL PROTECTED] #sessionCreated(IoSession)}. The biggest difference
from
+ * [EMAIL PROTECTED] #sessionCreated(IoSession)} is that it's invoked from
other thread
+ * than an I/O processor thread once thread modesl is configured properly.
*/
void sessionOpened(IoSession session) throws Exception;
/**
- * Invoked when the connection is closed. This method is not invoked if
the
- * transport type is UDP.
+ * Invoked when a connection is closed.
*/
void sessionClosed(IoSession session) throws Exception;
/**
- * Invoked when the connection is idle. Refer to [EMAIL PROTECTED]
IdleStatus}. This
- * method is not invoked if the transport type is UDP.
+ * Invoked with the related [EMAIL PROTECTED] IdleStatus} when a
connection becomes idle.
+ * This method is not invoked if the transport type is UDP; it's a known
bug,
+ * and will be fixed in 2.0.
*/
void sessionIdle(IoSession session, IdleStatus status) throws Exception;
@@ -68,14 +67,13 @@
void exceptionCaught(IoSession session, Throwable cause) throws Exception;
/**
- * Invoked when protocol message is received. Implement your protocol flow
- * here.
+ * Invoked when a message is received.
*/
void messageReceived(IoSession session, Object message) throws Exception;
/**
- * Invoked when protocol message that user requested by
- * [EMAIL PROTECTED] IoSession#write(Object)} is sent out actually.
+ * Invoked when a message written by [EMAIL PROTECTED]
IoSession#write(Object)} is
+ * sent out.
*/
void messageSent(IoSession session, Object message) throws Exception;
}
Modified:
mina/branches/1.1/core/src/main/java/org/apache/mina/common/IoHandler.java
URL:
http://svn.apache.org/viewvc/mina/branches/1.1/core/src/main/java/org/apache/mina/common/IoHandler.java?view=diff&rev=562343&r1=562342&r2=562343
==============================================================================
--- mina/branches/1.1/core/src/main/java/org/apache/mina/common/IoHandler.java
(original)
+++ mina/branches/1.1/core/src/main/java/org/apache/mina/common/IoHandler.java
Thu Aug 2 22:53:44 2007
@@ -22,41 +22,40 @@
import java.io.IOException;
/**
- * Handles all protocol events fired by MINA.
- * There are 6 event handler methods, and they are all invoked by MINA
- * automatically.
- * <p>
- * Please refer to
- * <a
href="../../../../../xref-examples/org/apache/mina/examples/reverser/ReverseIoHandler.html"><code>ReverseIoHandler</code></a>
- * example.
+ * Handles all I/O events fired by MINA.
*
- * @author The Apache Directory Project ([EMAIL PROTECTED])
+ * @author The Apache MINA Project ([EMAIL PROTECTED])
* @version $Rev$, $Date$
*
* @see IoHandlerAdapter
*/
public interface IoHandler {
/**
- * Invoked when the session is created. Initialize default socket
- * parameters and user-defined attributes here.
+ * Invoked from an I/O processor thread when a new connection has been
created.
+ * Because this method is supposed to be called from the same thread that
+ * handles I/O of multiple sessions, please implement this method to
perform
+ * tasks that consumes minimal amount of time such as socket parameter
+ * and user-defined session attribute initialization.
*/
void sessionCreated(IoSession session) throws Exception;
/**
- * Invoked when the connection is opened. This method is not invoked if
the
- * transport type is UDP.
+ * Invoked when a connection has been opened. This method is invoked after
+ * [EMAIL PROTECTED] #sessionCreated(IoSession)}. The biggest difference
from
+ * [EMAIL PROTECTED] #sessionCreated(IoSession)} is that it's invoked from
other thread
+ * than an I/O processor thread once thread modesl is configured properly.
*/
void sessionOpened(IoSession session) throws Exception;
/**
- * Invoked when the connection is closed. This method is not invoked if
the
- * transport type is UDP.
+ * Invoked when a connection is closed.
*/
void sessionClosed(IoSession session) throws Exception;
/**
- * Invoked when the connection is idle. Refer to [EMAIL PROTECTED]
IdleStatus}. This
- * method is not invoked if the transport type is UDP.
+ * Invoked with the related [EMAIL PROTECTED] IdleStatus} when a
connection becomes idle.
+ * This method is not invoked if the transport type is UDP; it's a known
bug,
+ * and will be fixed in 2.0.
*/
void sessionIdle(IoSession session, IdleStatus status) throws Exception;
@@ -68,14 +67,13 @@
void exceptionCaught(IoSession session, Throwable cause) throws Exception;
/**
- * Invoked when protocol message is received. Implement your protocol flow
- * here.
+ * Invoked when a message is received.
*/
void messageReceived(IoSession session, Object message) throws Exception;
/**
- * Invoked when protocol message that user requested by
- * [EMAIL PROTECTED] IoSession#write(Object)} is sent out actually.
+ * Invoked when a message written by [EMAIL PROTECTED]
IoSession#write(Object)} is
+ * sent out.
*/
void messageSent(IoSession session, Object message) throws Exception;
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/common/IoHandler.java
URL:
http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/common/IoHandler.java?view=diff&rev=562343&r1=562342&r2=562343
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/common/IoHandler.java
(original)
+++ mina/trunk/core/src/main/java/org/apache/mina/common/IoHandler.java Thu Aug
2 22:53:44 2007
@@ -22,13 +22,7 @@
import java.io.IOException;
/**
- * Handles all protocol events fired by MINA.
- * There are 6 event handler methods, and they are all invoked by MINA
- * automatically.
- * <p>
- * Please refer to
- * <a
href="../../../../../xref-examples/org/apache/mina/examples/reverser/ReverseIoHandler.html"><code>ReverseIoHandler</code></a>
- * example.
+ * Handles all I/O events fired by MINA.
*
* @author The Apache MINA Project ([EMAIL PROTECTED])
* @version $Rev$, $Date$
@@ -37,26 +31,31 @@
*/
public interface IoHandler {
/**
- * Invoked when the session is created. Initialize default socket
- * parameters and user-defined attributes here.
+ * Invoked from an I/O processor thread when a new connection has been
created.
+ * Because this method is supposed to be called from the same thread that
+ * handles I/O of multiple sessions, please implement this method to
perform
+ * tasks that consumes minimal amount of time such as socket parameter
+ * and user-defined session attribute initialization.
*/
void sessionCreated(IoSession session) throws Exception;
/**
- * Invoked when the connection is opened. This method is not invoked if
the
- * transport type is UDP.
+ * Invoked when a connection has been opened. This method is invoked after
+ * [EMAIL PROTECTED] #sessionCreated(IoSession)}. The biggest difference
from
+ * [EMAIL PROTECTED] #sessionCreated(IoSession)} is that it's invoked from
other thread
+ * than an I/O processor thread once thread modesl is configured properly.
*/
void sessionOpened(IoSession session) throws Exception;
/**
- * Invoked when the connection is closed. This method is not invoked if
the
- * transport type is UDP.
+ * Invoked when a connection is closed.
*/
void sessionClosed(IoSession session) throws Exception;
/**
- * Invoked when the connection is idle. Refer to [EMAIL PROTECTED]
IdleStatus}. This
- * method is not invoked if the transport type is UDP.
+ * Invoked with the related [EMAIL PROTECTED] IdleStatus} when a
connection becomes idle.
+ * This method is not invoked if the transport type is UDP; it's a known
bug,
+ * and will be fixed in 2.0.
*/
void sessionIdle(IoSession session, IdleStatus status) throws Exception;
@@ -68,14 +67,13 @@
void exceptionCaught(IoSession session, Throwable cause) throws Exception;
/**
- * Invoked when protocol message is received. Implement your protocol flow
- * here.
+ * Invoked when a message is received.
*/
void messageReceived(IoSession session, Object message) throws Exception;
/**
- * Invoked when protocol message that user requested by
- * [EMAIL PROTECTED] IoSession#write(Object)} is sent out actually.
+ * Invoked when a message written by [EMAIL PROTECTED]
IoSession#write(Object)} is
+ * sent out.
*/
void messageSent(IoSession session, Object message) throws Exception;
}