tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkCoyoteHandler.java JkMain.java
Date Tue, 02 Sep 2003 00:17:40 GMT
billbarker    2003/09/01 17:17:40

  Modified:    jk/java/org/apache/jk/server JkCoyoteHandler.java
                        JkMain.java
  Log:
  Adding accessors so that the JkCoyote connectors can play nice with the admin webapp.
  
  Revision  Changes    Path
  1.43      +6 -2      jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkCoyoteHandler.java
  
  Index: JkCoyoteHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkCoyoteHandler.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- JkCoyoteHandler.java	30 Jul 2003 02:25:53 -0000	1.42
  +++ JkCoyoteHandler.java	2 Sep 2003 00:17:40 -0000	1.43
  @@ -132,9 +132,13 @@
           if( value instanceof String )
               this.setProperty( name, (String)value );
       }
  -    
  +
  +    /**
  +     * Retrieve config info.
  +     * Primarily for use with the admin webapp.
  +     */   
       public Object getAttribute( String name ) {
  -        return null;
  +        return getJkMain().getProperty(name);
       }
   
       /** The adapter, used to call the connector 
  
  
  
  1.41      +14 -1     jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java
  
  Index: JkMain.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- JkMain.java	2 Jul 2003 06:30:23 -0000	1.40
  +++ JkMain.java	2 Sep 2003 00:17:40 -0000	1.41
  @@ -188,7 +188,20 @@
               saveProperties();
           }
       }
  -
  +    /**
  +     * Retrieve a property.
  +     */
  +    public Object getProperty(String name) {
  +        String alias = (String)replacements.get(name);
  +        Object result = null;
  +        if(alias != null) {
  +            result = props.get(alias);
  +        }
  +        if(result == null) {
  +            result = props.get(name);
  +        }
  +        return result;
  +    }
       /**
        * Set the <code>channelClassName</code> that will used to connect to
        * httpd.
  
  
  

Mime
View raw message