donaldp     01/11/02 01:04:41

  Modified:    apps/demo/src/java/org/apache/avalon/cornerstone/demos/simpleserver
                        SimpleServer.java
  Log:
  Removed invalid ';' that violates JLS (and thus jikes wont compile it).
  
  Revision  Changes    Path
  1.2       +25 -11    
jakarta-avalon-cornerstone/apps/demo/src/java/org/apache/avalon/cornerstone/demos/simpleserver/SimpleServer.java
  
  Index: SimpleServer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-cornerstone/apps/demo/src/java/org/apache/avalon/cornerstone/demos/simpleserver/SimpleServer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SimpleServer.java 2001/09/10 20:53:17     1.1
  +++ SimpleServer.java 2001/11/02 09:04:41     1.2
  @@ -14,15 +14,6 @@
   import java.net.SocketException;
   import java.util.Iterator;
   import java.util.StringTokenizer;
  -import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
  -import org.apache.avalon.framework.configuration.Configurable;
  -import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.logger.AbstractLoggable;
   import org.apache.avalon.cornerstone.services.connection.ConnectionHandler;
   import org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory;
   import org.apache.avalon.cornerstone.services.connection.ConnectionManager;
  @@ -35,7 +26,19 @@
   import org.apache.avalon.cornerstone.services.sockets.SocketManager;
   import org.apache.avalon.cornerstone.services.store.ObjectRepository;
   import org.apache.avalon.cornerstone.services.store.Store;
  +import org.apache.avalon.framework.activity.Initializable;
  +import org.apache.avalon.framework.component.Component;
  +import org.apache.avalon.framework.component.ComponentException;
  +import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.component.Composable;
  +import org.apache.avalon.framework.configuration.Configurable;
  +import org.apache.avalon.framework.configuration.Configuration;
  +import org.apache.avalon.framework.configuration.ConfigurationException;
  +import org.apache.avalon.framework.context.Context;
  +import org.apache.avalon.framework.context.Contextualizable;
  +import org.apache.avalon.framework.logger.AbstractLoggable;
   import org.apache.avalon.phoenix.Block;
  +import org.apache.avalon.phoenix.BlockContext;
   
   /**
    * This is a demo block used to demonstrate a simple server using Avalon. The
  @@ -51,7 +54,7 @@
    */
   public class SimpleServer
       extends AbstractLoggable
  -    implements Block, SimpleService, Composable, Configurable, Initializable,
  +    implements Block, SimpleService, Contextualizable, Composable, Configurable, 
Initializable,
                  ConnectionHandlerFactory, ConnectionHandler, Target
   {
       private TimeScheduler           m_timeScheduler;
  @@ -63,6 +66,17 @@
   
       private PrintWriter             m_out;
       private int                     m_count;
  +    private BlockContext            m_context;
  +
  +    public void contextualize( final Context context )
  +    {
  +        m_context = (BlockContext)context;
  +    }
  +
  +    protected final BlockContext getBlockContext()
  +    {
  +        return m_context;
  +    }
   
       public void compose( final ComponentManager componentManager )
           throws ComponentException
  @@ -208,7 +222,7 @@
               }
           }
   
  -        System.out.println( "Target triggered: " + triggerName );
  +        System.out.println( "[" + getBlockContext().getName() + "] Target 
triggered: " + triggerName );
       }
   
       private boolean parseCommand( String command )
  
  
  

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

Reply via email to