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/socket AbstractCompleteSocketStreamServer.java
Date Mon, 10 Mar 2003 07:37:17 GMT
hammant     2003/03/09 23:37:16

  Modified:    src/java/org/apache/altrmi/server/impl/socket
                        AbstractCompleteSocketStreamServer.java
  Log:
  instantiate socket server out of contrstructor
  
  Revision  Changes    Path
  1.3       +12 -10    incubator-altrmi/src/java/org/apache/altrmi/server/impl/socket/AbstractCompleteSocketStreamServer.java
  
  Index: AbstractCompleteSocketStreamServer.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/src/java/org/apache/altrmi/server/impl/socket/AbstractCompleteSocketStreamServer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractCompleteSocketStreamServer.java	17 Feb 2003 20:29:05 -0000	1.2
  +++ AbstractCompleteSocketStreamServer.java	10 Mar 2003 07:37:16 -0000	1.3
  @@ -85,6 +85,7 @@
        * The thread handling the listening
        */
       private ThreadContext m_threadContext;
  +    private int m_port;
   
       /**
        * Construct a CompleteSocketObjectStreamServer
  @@ -117,14 +118,7 @@
   
           super( invocationHandlerAdapter );
   
  -        try
  -        {
  -            m_serverSocket = new ServerSocket( port );
  -        }
  -        catch( IOException ioe )
  -        {
  -            throw new ServerException( "Could not bind to a socket when setting up the
server", ioe);
  -        }
  +        m_port = port;
       }
   
       /**
  @@ -182,10 +176,18 @@
        * Method start
        *
        */
  -    public void start()
  +    public void start() throws ServerException
       {
   
           setState(STARTING);
  +        try
  +        {
  +            m_serverSocket = new ServerSocket( m_port );
  +        }
  +        catch( IOException ioe )
  +        {
  +            throw new ServerException( "Could not bind to a socket when setting up the
server", ioe);
  +        }
           getThreadContext().start();
           setState(STARTED);
   
  
  
  

Mime
View raw message