avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/callback CallBackTestImpl.java CallBackTestListener.java CallBackTestListenerImpl.java CallBackTestServer.java
Date Sun, 19 May 2002 08:46:11 GMT
hammant     02/05/19 01:46:11

  Modified:    altrmi/src/test/org/apache/excalibur/altrmi/test/callback
                        CallBackTestImpl.java CallBackTestListener.java
                        CallBackTestListenerImpl.java
                        CallBackTestServer.java
  Log:
  A Test that fails.  Thus one that highlights improvements needed.
  
  Revision  Changes    Path
  1.3       +6 -1      jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/callback/CallBackTestImpl.java
  
  Index: CallBackTestImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/callback/CallBackTestImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CallBackTestImpl.java	24 Apr 2002 12:43:03 -0000	1.2
  +++ CallBackTestImpl.java	19 May 2002 08:46:11 -0000	1.3
  @@ -41,7 +41,7 @@
       /*
        * @see CallBackTest#generateEvent()
        */
  -    public void generateEvent()
  +    public void generateEvent(CallBackTest callBackTest)
       {
           //while(true)
           {
  @@ -54,6 +54,11 @@
                       try
                       {
                           ( (CallBackTestListener)m_list.get( i ) ).serverCallingClient(
"Hello to presumed instance [" + i + "]" );
  +
  +
  +                        // TODO - This does not work, but perhaps should
  +                        // ( (CallBackTestListener)m_list.get( i ) ).serverCallingClient2(
callBackTest );
  +
                       }
                       catch( AltrmiConnectionClosedException ace ) //SHLD this be some other
exception
                       {
  
  
  
  1.3       +7 -0      jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/callback/CallBackTestListener.java
  
  Index: CallBackTestListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/callback/CallBackTestListener.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CallBackTestListener.java	24 Apr 2002 12:43:03 -0000	1.2
  +++ CallBackTestListener.java	19 May 2002 08:46:11 -0000	1.3
  @@ -18,4 +18,11 @@
        * Callback methods invoked by the server
        */
       public void serverCallingClient( String message );
  +
  +    /**
  +     * Second test, that passes back a (redundant) reference to the original
  +     * looked up CallBackTest server.
  +     */
  +    public void serverCallingClient2( CallBackTest callBackTest );
  +
   }
  
  
  
  1.3       +9 -0      jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/callback/CallBackTestListenerImpl.java
  
  Index: CallBackTestListenerImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/callback/CallBackTestListenerImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CallBackTestListenerImpl.java	24 Apr 2002 12:43:03 -0000	1.2
  +++ CallBackTestListenerImpl.java	19 May 2002 08:46:11 -0000	1.3
  @@ -29,4 +29,13 @@
       {
           System.out.println( "CallBackTestListenerImpl: Server message for instance number
" + instNbr + " [" + message + "]" );
       }
  +
  +    /**
  +     * Second test, that passes back a (redundant) reference to the original
  +     * looked up CallBackTest server.
  +     */
  +    public void serverCallingClient2(CallBackTest callBackTest)
  +    {
  +        System.out.println( "CallBackTestListenerImpl: serverCallingClient2(..) called"
);
  +    }
   }
  
  
  
  1.7       +2 -2      jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/callback/CallBackTestServer.java
  
  Index: CallBackTestServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/callback/CallBackTestServer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CallBackTestServer.java	24 Apr 2002 12:43:03 -0000	1.6
  +++ CallBackTestServer.java	19 May 2002 08:46:11 -0000	1.7
  @@ -58,7 +58,7 @@
           {
               try
               {
  -                Thread.sleep( 5000 ); // wait five seconds forclient to register three
callbacks.
  +                Thread.sleep( 5000 ); // wait five seconds for client to register three
callbacks.
               }
               catch( InterruptedException ie )
               {
  @@ -66,7 +66,7 @@
   
               while( true )
               {
  -                callBackTest.generateEvent();
  +                callBackTest.generateEvent(callBackTest);
               }
           }
       };
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message