incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: incubator-altrmi/src/java/org/apache/altrmi/server/impl ServerObjectStreamReadWriter.java
Date Mon, 26 May 2003 10:19:57 GMT
hammant     2003/05/26 03:19:57

  Modified:    src/java/org/apache/altrmi/client/impl/stream
                        ClientObjectStreamReadWriter.java
               src/java/org/apache/altrmi/server/impl
                        ServerObjectStreamReadWriter.java
  Log:
  Last removal of JSX legacy
  
  Revision  Changes    Path
  1.5       +7 -22     incubator-altrmi/src/java/org/apache/altrmi/client/impl/stream/ClientObjectStreamReadWriter.java
  
  Index: ClientObjectStreamReadWriter.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/src/java/org/apache/altrmi/client/impl/stream/ClientObjectStreamReadWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ClientObjectStreamReadWriter.java	25 May 2003 17:28:14 -0000	1.4
  +++ ClientObjectStreamReadWriter.java	26 May 2003 10:19:55 -0000	1.5
  @@ -54,11 +54,7 @@
    */
   package org.apache.altrmi.client.impl.stream;
   
  -import java.io.IOException;
  -import java.io.InputStream;
  -import java.io.ObjectInputStream;
  -import java.io.ObjectOutputStream;
  -import java.io.OutputStream;
  +import java.io.*;
   import java.lang.reflect.Constructor;
   import java.lang.reflect.InvocationTargetException;
   
  @@ -80,8 +76,6 @@
   
       private ObjectInputStream m_objectInputStream;
       private ObjectOutputStream m_objectOutputStream;
  -    private String m_objectOutputStreamClassName = "java.io.ObjectOutputStream";
  -    private String m_objectInputStreamClassName = "java.io.ObjectInputStream";
   
       /**
        * Constructor ClientObjectStreamReadWriter
  @@ -99,25 +93,16 @@
   
           try
           {
  -            Class clazz = this.getClass().getClassLoader().loadClass( m_objectOutputStreamClassName
);
  -            Constructor con = clazz.getConstructor( new Class[]{OutputStream.class} );
  -
  -            m_objectOutputStream = (ObjectOutputStream)con.newInstance( new Object[]{
  -                outputStream} );
  -            clazz = this.getClass().getClassLoader().loadClass( m_objectInputStreamClassName
);
  -            con = clazz.getConstructor( new Class[]{InputStream.class} );
  -            m_objectInputStream = (ObjectInputStream)con.newInstance( new Object[]{inputStream}
);
  +            m_objectOutputStream = new ObjectOutputStream(outputStream);
  +            m_objectInputStream = new ObjectInputStream(inputStream);
           }
  -        catch(InvocationTargetException ite)
  +        catch(EOFException eofe)
           {
               throw new BadConnectionException( "Cannot connect to remote AltRMI server.
Have we a mismatch on transports?");
           }
  -        catch( Exception e )
  +        catch(IOException ioe)
           {
  -            e.printStackTrace();
  -
  -            throw new ConnectionException( "Some problem instantiating ObjectStream classes:
"
  -                                   + e.getMessage() );
  +            throw new ConnectionException( "Some problem instantiating ObjectStream classes:
" + ioe.getMessage() );
           }
       }
   
  
  
  
  1.5       +3 -32     incubator-altrmi/src/java/org/apache/altrmi/server/impl/ServerObjectStreamReadWriter.java
  
  Index: ServerObjectStreamReadWriter.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/src/java/org/apache/altrmi/server/impl/ServerObjectStreamReadWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ServerObjectStreamReadWriter.java	25 May 2003 17:13:52 -0000	1.4
  +++ ServerObjectStreamReadWriter.java	26 May 2003 10:19:57 -0000	1.5
  @@ -84,16 +84,6 @@
       private ObjectOutputStream m_objectOutputStream;
   
       /**
  -     * The Object Output Stream Class name
  -     */
  -    private String m_objectOutputStreamClassName = "java.io.ObjectOutputStream";
  -
  -    /**
  -     * The Object Input Stream Class name
  -     */
  -    private String m_objectInputStreamClassName = "java.io.ObjectInputStream";
  -
  -    /**
        * Constructor ServerObjectStreamReadWriter
        *
        *
  @@ -108,27 +98,8 @@
        */
       protected void initialize() throws IOException
       {
  -
  -        try
  -        {
  -            Class clazz =
  -                    this.getClass().getClassLoader().loadClass( m_objectInputStreamClassName
);
  -            Constructor con = clazz.getConstructor( new Class[]{InputStream.class} );
  -
  -            m_objectInputStream = (ObjectInputStream)con.newInstance( new Object[]{
  -                getInputStream()} );
  -            clazz = this.getClass().getClassLoader().loadClass( m_objectOutputStreamClassName
);
  -            con = clazz.getConstructor( new Class[]{OutputStream.class} );
  -            m_objectOutputStream = (ObjectOutputStream)con.newInstance( new Object[]{
  -                getOutputStream()} );
  -        }
  -        catch( Exception e )
  -        {
  -            e.printStackTrace();
  -
  -            throw new IOException( "Some problem instantiating ObjectStream classes: "
  -                                   + e.getMessage() );
  -        }
  +            m_objectInputStream = new ObjectInputStream(getInputStream());
  +            m_objectOutputStream = new ObjectOutputStream( getOutputStream() );
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message