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

Ron Sigal ron_sigal at yahoo.com
Sat Feb 3 00:15:09 EST 2007


  User: rsigal  
  Date: 07/02/03 00:15:09

  Modified:    src/main/org/jboss/remoting/transport/socket 
                        ServerSocketWrapper.java
  Log:
  JBREM-690, JBREM-692: sync with remoting_2_x.
  
  Revision  Changes    Path
  1.17      +23 -19    JBossRemoting/src/main/org/jboss/remoting/transport/socket/ServerSocketWrapper.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ServerSocketWrapper.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/transport/socket/ServerSocketWrapper.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -b -r1.16 -r1.17
  --- ServerSocketWrapper.java	9 Nov 2006 21:35:23 -0000	1.16
  +++ ServerSocketWrapper.java	3 Feb 2007 05:15:08 -0000	1.17
  @@ -22,14 +22,12 @@
   
   package org.jboss.remoting.transport.socket;
   
  -import org.jboss.logging.Logger;
  -
   import java.io.EOFException;
   import java.io.IOException;
  -import java.io.InputStream;
   import java.io.OutputStream;
   import java.net.Socket;
   import java.util.Map;
  +import org.jboss.logging.Logger;
   
   /**
    * @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
  @@ -48,22 +46,22 @@
         super(socket, metadata, timeout);
      }
   
  -   protected InputStream createInputStream(String serializationType, Socket socket) throws IOException
  +   public void close() throws IOException
  +   {
  +      if(getSocket() != null)
  +      {
  +         try
  +         {
  +            getOutputStream().write(CLOSING);
  +            getOutputStream().flush();
  +            log.debug("wrote CLOSING");
  +         }
  +         catch (IOException e)
      {
  -//      BufferedInputStream bin = new BufferedInputStream(socket.getInputStream());
  -//      ObjectInputStream oin = SerializationStreamFactory.getManagerInstance(serializationType).createInput(bin, null);
  -//      return oin;
  -      return socket.getInputStream();
  -   }
  -
  -   protected OutputStream createOutputStream(String serializationType, Socket socket)
  -         throws IOException
  -   {
  -//      BufferedOutputStream bout = new BufferedOutputStream(socket.getOutputStream());
  -//      ObjectOutputStream oout = SerializationStreamFactory.getManagerInstance(serializationType).createOutput(bout);
  -//      oout.flush();
  -//      return oout;
  -      return socket.getOutputStream();
  +            log.debug("unable to writing CLOSING byte", e);
  +         }
  +      }
  +      super.close();
      }
   
      public void checkConnection() throws IOException
  @@ -108,4 +106,10 @@
         out.write(ACK);
         out.flush();
      }
  +
  +   public String toString()
  +   {
  +      return "ServerSocketWrapper[" + getSocket() + "]";
  +   }
  +
   }
  
  
  



More information about the jboss-cvs-commits mailing list