[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/transport/multiplex ...

Ron Sigal ron_sigal at yahoo.com
Sat Jul 22 18:15:20 EDT 2006


  User: rsigal  
  Date: 06/07/22 18:15:20

  Modified:    src/main/org/jboss/remoting/transport/multiplex 
                        VirtualSocket.java
  Log:
  JBREM-534:  Added two new methods:
  
  1. notifyOfException() allows MultiplexingManager to tell the virtual socket that there has been an unrecoverable error on the tcp connection.
  
  2. isFunctional() returns true if and only if the virtual socket is still functional - i.e., notifyOfException() has not been called.
  
  Revision  Changes    Path
  1.49      +22 -2     JBossRemoting/src/main/org/jboss/remoting/transport/multiplex/VirtualSocket.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: VirtualSocket.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/transport/multiplex/VirtualSocket.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -b -r1.48 -r1.49
  --- VirtualSocket.java	19 Jul 2006 23:22:28 -0000	1.48
  +++ VirtualSocket.java	22 Jul 2006 22:15:20 -0000	1.49
  @@ -44,8 +44,6 @@
   import java.util.Map;
   import java.util.Set;
   
  -import javax.net.SocketFactory;
  -
   import org.jboss.logging.Logger;
   
   /**
  @@ -86,6 +84,8 @@
      private int     timeout;  
      private Socket  dummySocket;
    
  +   private boolean functional = true;
  + 
      private boolean trace;
      private boolean debug;
      private boolean info;
  @@ -1023,6 +1023,18 @@
      }
   
      
  +   /**
  +    * Returns true if and only if has not received notification of error state
  +    * on actual connection.
  +    * 
  +    * @return true if and only if has not received notification of error state
  +    *         on actual connection
  +    */
  +   public boolean isFunctional()
  +   {
  +      return functional;
  +   }
  +   
   /**
    * 
    * @param listener
  @@ -1277,6 +1289,14 @@
      }
      
      
  +   /**
  +    * Indicate error condition on actual connection.
  +    */
  +   protected void notifyOfException()
  +   {
  +      functional = false;
  +   }
  +   
      protected class PendingRemoteDisconnect extends PendingAction
      {
         public PendingRemoteDisconnect(Object o)
  
  
  



More information about the jboss-cvs-commits mailing list