Author: jvermillard
Date: Wed Jul 16 13:53:52 2008
New Revision: 677424

URL: http://svn.apache.org/viewvc?rev=677424&view=rev
Log:
finished AbstractPollingIoProcessor javadoc

Modified:
    
mina/trunk/core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoProcessor.java

Modified: 
mina/trunk/core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoProcessor.java
URL: 
http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoProcessor.java?rev=677424&r1=677423&r2=677424&view=diff
==============================================================================
--- 
mina/trunk/core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoProcessor.java
 (original)
+++ 
mina/trunk/core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoProcessor.java
 Wed Jul 16 13:53:52 2008
@@ -276,15 +276,36 @@
     
     /**
      * Reads a sequence of bytes from a [EMAIL PROTECTED] IoSession} into the 
given [EMAIL PROTECTED] IoBuffer}. 
-     * Is called when the session was found ready for readying.
+     * Is called when the session was found ready for reading.
      * @param session the session to read
      * @param buf the buffer to fill
      * @return the number of bytes read
      * @throws Exception any exception thrown by the underlying system calls
      */
     protected abstract int read(T session, IoBuffer buf) throws Exception;
-    
+
+    /**
+     * Write a sequence of bytes to a [EMAIL PROTECTED] IoSession}, means to 
be called when a session
+     * was found ready for writing.
+     * @param session the session to write
+     * @param buf the buffer to write
+     * @param length the number of bytes to write can be superior to the 
number of bytes remaining
+     * in the buffer
+     * @return the number of byte written
+     * @throws Exception any exception thrown by the underlying system calls
+     */
     protected abstract int write(T session, IoBuffer buf, int length) throws 
Exception;
+    
+    /**
+     * Write a part of a file to a [EMAIL PROTECTED] IoSession}, if the 
underlying API isn't supporting
+     * system calls like sendfile(), you can throw a [EMAIL PROTECTED] 
UnsupportedOperationException} so 
+     * the file will be send using usual [EMAIL PROTECTED] 
#write(AbstractIoSession, IoBuffer, int)} call. 
+     * @param session the session to write
+     * @param region the file region to write
+     * @param length the length of the portion to send
+     * @return the number of written bytes
+     * @throws Exception any exception thrown by the underlying system calls
+     */
     protected abstract int transferFile(T session, FileRegion region, int 
length) throws Exception;
 
     /**
@@ -814,10 +835,6 @@
     }
 
     
-    /**
-     *  
-     *
-     */
     private class Worker implements Runnable {
         public void run() {
             int nSessions = 0;


Reply via email to