mina-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvermill...@apache.org
Subject svn commit: r677436 - in /mina/trunk/core/src: main/java/org/apache/mina/core/future/ main/java/org/apache/mina/core/write/ test/java/org/apache/mina/core/ test/java/org/apache/mina/filter/stream/
Date Wed, 16 Jul 2008 21:26:46 GMT
Author: jvermillard
Date: Wed Jul 16 14:26:45 2008
New Revision: 677436

URL: http://svn.apache.org/viewvc?rev=677436&view=rev
Log:
DIRMINA-600 IoFuture.isReady renamed to IoFuture.isDone

Modified:
    mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultCloseFuture.java
    mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultIoFuture.java
    mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultReadFuture.java
    mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultWriteFuture.java
    mina/trunk/core/src/main/java/org/apache/mina/core/future/IoFuture.java
    mina/trunk/core/src/main/java/org/apache/mina/core/write/DefaultWriteRequest.java
    mina/trunk/core/src/test/java/org/apache/mina/core/FutureTest.java
    mina/trunk/core/src/test/java/org/apache/mina/filter/stream/AbstractStreamWriteFilterTest.java

Modified: mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultCloseFuture.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultCloseFuture.java?rev=677436&r1=677435&r2=677436&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultCloseFuture.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultCloseFuture.java Wed
Jul 16 14:26:45 2008
@@ -26,7 +26,7 @@
  * A default implementation of {@link CloseFuture}.
  *
  * @author The Apache MINA Project (dev@mina.apache.org)
- * @version $Rev$, $Date$
+ * @version $Rev:671827 $, $Date:2008-06-26 09:49:48 +0100 (jeu., 26 juin 2008) $
  */
 public class DefaultCloseFuture extends DefaultIoFuture implements CloseFuture {
     /**
@@ -37,7 +37,7 @@
     }
 
     public boolean isClosed() {
-        if (isReady()) {
+        if (isDone()) {
             return ((Boolean) getValue()).booleanValue();
         } else {
             return false;

Modified: mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultIoFuture.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultIoFuture.java?rev=677436&r1=677435&r2=677436&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultIoFuture.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultIoFuture.java Wed Jul
16 14:26:45 2008
@@ -34,7 +34,7 @@
  * an {@link IoSession}.
  * 
  * @author The Apache MINA Project (dev@mina.apache.org)
- * @version $Rev$, $Date$
+ * @version $Rev:671827 $, $Date:2008-06-26 09:49:48 +0100 (jeu., 26 juin 2008) $
  */
 public class DefaultIoFuture implements IoFuture {
 
@@ -258,7 +258,7 @@
     /**
      * {@inheritDoc}
      */
-    public boolean isReady() {
+    public boolean isDone() {
         synchronized (lock) {
             return ready;
         }

Modified: mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultReadFuture.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultReadFuture.java?rev=677436&r1=677435&r2=677436&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultReadFuture.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultReadFuture.java Wed Jul
16 14:26:45 2008
@@ -29,7 +29,7 @@
  * A default implementation of {@link WriteFuture}.
  *
  * @author The Apache MINA Project (dev@mina.apache.org)
- * @version $Rev$, $Date$
+ * @version $Rev:671827 $, $Date:2008-06-26 09:49:48 +0100 (jeu., 26 juin 2008) $
  */
 public class DefaultReadFuture extends DefaultIoFuture implements ReadFuture {
     
@@ -43,7 +43,7 @@
     }
     
     public Object getMessage() {
-        if (isReady()) {
+        if (isDone()) {
             Object v = getValue();
             if (v == CLOSED) {
                 return null;
@@ -70,7 +70,7 @@
 
 
     public boolean isRead() {
-        if (isReady()) {
+        if (isDone()) {
             Object v = getValue();
             return (v != CLOSED && !(v instanceof ExceptionHolder));
         }
@@ -78,14 +78,14 @@
     }
     
     public boolean isClosed() {
-        if (isReady()) {
+        if (isDone()) {
             return getValue() == CLOSED;
         }
         return false;
     }
 
     public Throwable getException() {
-        if (isReady()) {
+        if (isDone()) {
             Object v = getValue();
             if (v instanceof ExceptionHolder) {
                 return ((ExceptionHolder) v).exception;

Modified: mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultWriteFuture.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultWriteFuture.java?rev=677436&r1=677435&r2=677436&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultWriteFuture.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/core/future/DefaultWriteFuture.java Wed
Jul 16 14:26:45 2008
@@ -26,7 +26,7 @@
  * A default implementation of {@link WriteFuture}.
  *
  * @author The Apache MINA Project (dev@mina.apache.org)
- * @version $Rev$, $Date$
+ * @version $Rev:671827 $, $Date:2008-06-26 09:49:48 +0100 (jeu., 26 juin 2008) $
  */
 public class DefaultWriteFuture extends DefaultIoFuture implements WriteFuture {
     /**
@@ -58,7 +58,7 @@
      * {@inheritDoc}
      */
     public boolean isWritten() {
-        if (isReady()) {
+        if (isDone()) {
             Object v = getValue();
             if (v instanceof Boolean) {
                 return ((Boolean) v).booleanValue();
@@ -71,7 +71,7 @@
      * {@inheritDoc}
      */
     public Throwable getException() {
-        if (isReady()) {
+        if (isDone()) {
             Object v = getValue();
             if (v instanceof Throwable) {
                 return (Throwable) v;

Modified: mina/trunk/core/src/main/java/org/apache/mina/core/future/IoFuture.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/core/future/IoFuture.java?rev=677436&r1=677435&r2=677436&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/core/future/IoFuture.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/core/future/IoFuture.java Wed Jul 16 14:26:45
2008
@@ -29,7 +29,7 @@
  * Can be listened for completion using a {@link IoFutureListener}.
  * 
  * @author The Apache MINA Project (dev@mina.apache.org)
- * @version $Rev$, $Date$
+ * @version $Rev:671827 $, $Date:2008-06-26 09:49:48 +0100 (jeu., 26 juin 2008) $
  */
 public interface IoFuture {
 	
@@ -99,7 +99,7 @@
     /**
      * Returns if the asynchronous operation is completed.
      */
-    boolean isReady();
+    boolean isDone();
 
     /**
      * Adds an event <tt>listener</tt> which is notified when

Modified: mina/trunk/core/src/main/java/org/apache/mina/core/write/DefaultWriteRequest.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/core/write/DefaultWriteRequest.java?rev=677436&r1=677435&r2=677436&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/core/write/DefaultWriteRequest.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/core/write/DefaultWriteRequest.java Wed
Jul 16 14:26:45 2008
@@ -30,7 +30,7 @@
  * The default implementation of {@link WriteRequest}.
  *
  * @author The Apache MINA Project (dev@mina.apache.org)
- * @version $Rev$, $Date$
+ * @version $Rev:671827 $, $Date:2008-06-26 09:49:48 +0100 (jeu., 26 juin 2008) $
  */
 public class DefaultWriteRequest implements WriteRequest {
     private static final WriteFuture UNUSED_FUTURE = new WriteFuture() {
@@ -52,7 +52,7 @@
             return true;
         }
 
-        public boolean isReady() {
+        public boolean isDone() {
             return true;
         }
 

Modified: mina/trunk/core/src/test/java/org/apache/mina/core/FutureTest.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/test/java/org/apache/mina/core/FutureTest.java?rev=677436&r1=677435&r2=677436&view=diff
==============================================================================
--- mina/trunk/core/src/test/java/org/apache/mina/core/FutureTest.java (original)
+++ mina/trunk/core/src/test/java/org/apache/mina/core/FutureTest.java Wed Jul 16 14:26:45
2008
@@ -35,13 +35,13 @@
  * Tests {@link IoFuture} implementations.
  *
  * @author The Apache MINA Project (dev@mina.apache.org)
- * @version $Rev$, $Date$
+ * @version $Rev:671827 $, $Date:2008-06-26 09:49:48 +0100 (jeu., 26 juin 2008) $
  */
 public class FutureTest extends TestCase {
 
     public void testCloseFuture() throws Exception {
         DefaultCloseFuture future = new DefaultCloseFuture(null);
-        assertFalse(future.isReady());
+        assertFalse(future.isDone());
         assertFalse(future.isClosed());
 
         TestThread thread = new TestThread(future);
@@ -51,13 +51,13 @@
         thread.join();
 
         assertTrue(thread.success);
-        assertTrue(future.isReady());
+        assertTrue(future.isDone());
         assertTrue(future.isClosed());
     }
 
     public void testConnectFuture() throws Exception {
         DefaultConnectFuture future = new DefaultConnectFuture();
-        assertFalse(future.isReady());
+        assertFalse(future.isDone());
         assertFalse(future.isConnected());
         assertNull(future.getSession());
         assertNull(future.getException());
@@ -71,7 +71,7 @@
         thread.join();
 
         assertTrue(thread.success);
-        assertTrue(future.isReady());
+        assertTrue(future.isDone());
         assertTrue(future.isConnected());
         assertEquals(session, future.getSession());
         assertNull(future.getException());
@@ -83,7 +83,7 @@
         thread.join();
 
         assertTrue(thread.success);
-        assertTrue(future.isReady());
+        assertTrue(future.isDone());
         assertFalse(future.isConnected());
         assertTrue(future.getException() instanceof IOException);
 
@@ -96,7 +96,7 @@
 
     public void testWriteFuture() throws Exception {
         DefaultWriteFuture future = new DefaultWriteFuture(null);
-        assertFalse(future.isReady());
+        assertFalse(future.isDone());
         assertFalse(future.isWritten());
 
         TestThread thread = new TestThread(future);
@@ -106,7 +106,7 @@
         thread.join();
 
         assertTrue(thread.success);
-        assertTrue(future.isReady());
+        assertTrue(future.isDone());
         assertTrue(future.isWritten());
 
         future = new DefaultWriteFuture(null);
@@ -117,14 +117,14 @@
         thread.join();
 
         assertTrue(thread.success);
-        assertTrue(future.isReady());
+        assertTrue(future.isDone());
         assertFalse(future.isWritten());
         assertTrue(future.getException().getClass() == Exception.class);
     }
 
     public void testAddListener() throws Exception {
         DefaultCloseFuture future = new DefaultCloseFuture(null);
-        assertFalse(future.isReady());
+        assertFalse(future.isDone());
         assertFalse(future.isClosed());
 
         TestListener listener1 = new TestListener();
@@ -139,7 +139,7 @@
         thread.join();
 
         assertTrue(thread.success);
-        assertTrue(future.isReady());
+        assertTrue(future.isDone());
         assertTrue(future.isClosed());
 
         assertSame(future, listener1.notifiedFuture);
@@ -148,7 +148,7 @@
 
     public void testLateAddListener() throws Exception {
         DefaultCloseFuture future = new DefaultCloseFuture(null);
-        assertFalse(future.isReady());
+        assertFalse(future.isDone());
         assertFalse(future.isClosed());
 
         TestThread thread = new TestThread(future);
@@ -158,7 +158,7 @@
         thread.join();
 
         assertTrue(thread.success);
-        assertTrue(future.isReady());
+        assertTrue(future.isDone());
         assertTrue(future.isClosed());
 
         TestListener listener = new TestListener();
@@ -168,7 +168,7 @@
 
     public void testRemoveListener1() throws Exception {
         DefaultCloseFuture future = new DefaultCloseFuture(null);
-        assertFalse(future.isReady());
+        assertFalse(future.isDone());
         assertFalse(future.isClosed());
 
         TestListener listener1 = new TestListener();
@@ -184,7 +184,7 @@
         thread.join();
 
         assertTrue(thread.success);
-        assertTrue(future.isReady());
+        assertTrue(future.isDone());
         assertTrue(future.isClosed());
 
         assertSame(null, listener1.notifiedFuture);
@@ -193,7 +193,7 @@
 
     public void testRemoveListener2() throws Exception {
         DefaultCloseFuture future = new DefaultCloseFuture(null);
-        assertFalse(future.isReady());
+        assertFalse(future.isDone());
         assertFalse(future.isClosed());
 
         TestListener listener1 = new TestListener();
@@ -209,7 +209,7 @@
         thread.join();
 
         assertTrue(thread.success);
-        assertTrue(future.isReady());
+        assertTrue(future.isDone());
         assertTrue(future.isClosed());
 
         assertSame(future, listener1.notifiedFuture);

Modified: mina/trunk/core/src/test/java/org/apache/mina/filter/stream/AbstractStreamWriteFilterTest.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/test/java/org/apache/mina/filter/stream/AbstractStreamWriteFilterTest.java?rev=677436&r1=677435&r2=677436&view=diff
==============================================================================
--- mina/trunk/core/src/test/java/org/apache/mina/filter/stream/AbstractStreamWriteFilterTest.java
(original)
+++ mina/trunk/core/src/test/java/org/apache/mina/filter/stream/AbstractStreamWriteFilterTest.java
Wed Jul 16 14:26:45 2008
@@ -508,7 +508,7 @@
             return true;
         }
 
-        public boolean isReady() {
+        public boolean isDone() {
             return true;
         }
 



Mime
View raw message