hammant     02/04/10 16:15:14

  Modified:    altrmi/src/java/org/apache/excalibur/altrmi/client/impl/stream
                        CallbackEnabledClientCustomStreamReadWriter.java
  Log:
  remove dependence on JDK 1.4
  
  Revision  Changes    Path
  1.2       +24 -24    
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/stream/CallbackEnabledClientCustomStreamReadWriter.java
  
  Index: CallbackEnabledClientCustomStreamReadWriter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/stream/CallbackEnabledClientCustomStreamReadWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CallbackEnabledClientCustomStreamReadWriter.java  10 Apr 2002 22:46:18 
-0000      1.1
  +++ CallbackEnabledClientCustomStreamReadWriter.java  10 Apr 2002 23:15:14 
-0000      1.2
  @@ -26,15 +26,15 @@
   
   /**
    * Class CallbackEnabledClientCustomStreamReadWriter
  - *   This class embedds within itself a AltrmiServer which holds the 
  + *   This class embedds within itself a AltrmiServer which holds the
    *   exposedObjects for the client and upon which the Server can make
    *   callbacks.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Vinay Chandran</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
  -public class CallbackEnabledClientCustomStreamReadWriter 
  -                     extends ClientStreamReadWriter 
  +public class CallbackEnabledClientCustomStreamReadWriter
  +                     extends ClientStreamReadWriter
                        implements Runnable
   {
        //Mutex to block the client till a reply reaches back from server
  @@ -89,13 +89,13 @@
        {
                while(!mIsStopped)
                {
  -             try 
  +             try
                {
                                int byteArraySize = (int) 
mDataInputStream.readInt();
                            byte[] byteArray = new byte[byteArraySize];
  -                     
  +
                            mDataInputStream.read(byteArray);
  -                     
  +
                            
//_replyQueue.addFirst(SerializationHelper.getInstanceFromBytes(byteArray, 
mInterfacesClassLoader));
                            Object 
obj=SerializationHelper.getInstanceFromBytes(byteArray, mInterfacesClassLoader);
   
  @@ -114,27 +114,27 @@
                                }
                                else
                                {
  -                                     //NEVER OCCURS 
  +                                     //NEVER OCCURS
                                }
   
  -                     } 
  -                     catch(IOException e) 
  +                     }
  +                     catch(IOException e)
                        {
                                // :-?
  -                             if(e instanceof java.net.SocketTimeoutException)
  +                             
if(e.getClass().getName().equals("java.net.SocketTimeoutException"))
                                        continue;
                                e.printStackTrace();
                                mIsStopped=true;
                                return;
  -                     } 
  -                     catch(ClassNotFoundException e) 
  +                     }
  +                     catch(ClassNotFoundException e)
                        {
                                e.printStackTrace();
                        }
  -             
  +
                }
        }
  -     
  +
        /**
         * Method getReplyFromMessageLoop.
         *      Returns the reply recevied from the server
  @@ -146,11 +146,11 @@
                {
                        synchronized(mReplyLock)
                        {
  -                             try 
  +                             try
                                {
                                        mReplyLock.wait();
  -                             } 
  -                             catch(InterruptedException e) 
  +                             }
  +                             catch(InterruptedException e)
                                {
                                        e.printStackTrace();
                                }
  @@ -158,8 +158,8 @@
                }
                return mReply;
        }
  -     
  -     
  +
  +
        /*
         * @see ClientStreamReadWriter#postRequest(AltrmiRequest)
         */
  @@ -194,7 +194,7 @@
         * @throws ClassNotFoundException
         */
       private AltrmiReply readReply() throws IOException, 
ClassNotFoundException {
  -             
  +
                return getReplyFromMessageLoop();
       }
   
  @@ -218,7 +218,7 @@
   
        /**
         * Method exposeObject.
  -      *      Expose the Object by adding it to the internal AltrmiServer 
  +      *      Expose the Object by adding it to the internal AltrmiServer
         *      and by assigning a unique PublishedName for the same.
         * @param tobeExposedObject
         * @param tobeExposedInterface
  @@ -255,7 +255,7 @@
        }
        /**
         * Method getPublishedName.
  -      *      Use while marshalling the exposedObject as an argument 
  +      *      Use while marshalling the exposedObject as an argument
         *  to the server.
         * @param tobeExposedObject
         * @return String
  @@ -264,5 +264,5 @@
        {
                return 
(String)mExposedObjPublishNameHash_.get(tobeExposedObject);
        }
  -    
  +
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to