directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r354683 - in /directory/network/trunk/src/java/org/apache/mina/common: CloseFuture.java ConnectFuture.java IoFuture.java WriteFuture.java
Date Wed, 07 Dec 2005 03:03:21 GMT
Author: trustin
Date: Tue Dec  6 19:03:15 2005
New Revision: 354683

URL: http://svn.apache.org/viewcvs?rev=354683&view=rev
Log:
* Revived IoFuture constructors with custom locks
* Constructors of IoFuture is now all public in case users want to use it.

Modified:
    directory/network/trunk/src/java/org/apache/mina/common/CloseFuture.java
    directory/network/trunk/src/java/org/apache/mina/common/ConnectFuture.java
    directory/network/trunk/src/java/org/apache/mina/common/IoFuture.java
    directory/network/trunk/src/java/org/apache/mina/common/WriteFuture.java

Modified: directory/network/trunk/src/java/org/apache/mina/common/CloseFuture.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/common/CloseFuture.java?rev=354683&r1=354682&r2=354683&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/common/CloseFuture.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/common/CloseFuture.java Tue Dec  6 19:03:15
2005
@@ -43,6 +43,9 @@
     {
     }
     
+    /**
+     * Creates a new instance which uses the specified object as a lock.
+     */
     public CloseFuture( Object lock )
     {
         super( lock );

Modified: directory/network/trunk/src/java/org/apache/mina/common/ConnectFuture.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/common/ConnectFuture.java?rev=354683&r1=354682&r2=354683&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/common/ConnectFuture.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/common/ConnectFuture.java Tue Dec  6
19:03:15 2005
@@ -54,6 +54,14 @@
     }
     
     /**
+     * Creates a new instance which uses the specified object as a lock.
+     */
+    public ConnectFuture( Object lock )
+    {
+        super( lock );
+    }
+
+    /**
      * Returns {@link IoSession} which is the result of connect operation.
      * 
      * @return <tt>null</tt> if the connect operation is not finished yet

Modified: directory/network/trunk/src/java/org/apache/mina/common/IoFuture.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/common/IoFuture.java?rev=354683&r1=354682&r2=354683&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/common/IoFuture.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/common/IoFuture.java Tue Dec  6 19:03:15
2005
@@ -51,14 +51,29 @@
     /**
      * Creates a new instance.
      */
-    protected IoFuture()
+    public IoFuture()
     {
         this.lock = this;
     }
     
-    protected IoFuture( Object lock )
+    /**
+     * Creates a new instance which uses the specified object as a lock.
+     */
+    public IoFuture( Object lock )
     {
+        if( lock == null )
+        {
+            throw new NullPointerException( "lock" );
+        }
         this.lock = lock;
+    }
+    
+    /**
+     * Returns the lock object this future acquires.
+     */
+    public Object getLock()
+    {
+        return lock;
     }
     
     /**

Modified: directory/network/trunk/src/java/org/apache/mina/common/WriteFuture.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/common/WriteFuture.java?rev=354683&r1=354682&r2=354683&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/common/WriteFuture.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/common/WriteFuture.java Tue Dec  6 19:03:15
2005
@@ -71,6 +71,14 @@
     }
     
     /**
+     * Creates a new instance which uses the specified object as a lock.
+     */
+    public WriteFuture( Object lock )
+    {
+        super( lock );
+    }
+    
+    /**
      * Returns <tt>true</tt> if the write operation is finished successfully.
      */
     public boolean isWritten()



Mime
View raw message