avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl URLSource.java
Date Tue, 23 Apr 2002 15:35:27 GMT
cziegeler    02/04/23 08:35:27

  Modified:    sourceresolve/src/java/org/apache/excalibur/source/impl
                        URLSource.java
  Added:       monitor/src/java/org/apache/avalon/excalibur/monitor
                        MonitorableURLSource.java
  Log:
  Fixed dependency problems
  
  Revision  Changes    Path
  1.1                  jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/MonitorableURLSource.java
  
  Index: MonitorableURLSource.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.avalon.excalibur.monitor;
  
  import java.io.IOException;
  import java.net.URL;
  import java.util.Map;
  import org.apache.excalibur.source.impl.URLSource;
  
  /**
   * This adds the <code>Monitorable</code> interface to the URLSource.
   *
   * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
   * @version CVS $Revision: 1.1 $ $Date: 2002/04/23 15:35:27 $
   */
  
  public class MonitorableURLSource
      extends URLSource
      implements Monitorable
  {
  
      /**
       * Construct a new object from a <code>URL</code>.
       * @param parameters This is optional
       */
      public MonitorableURLSource( URL url,
           Map parameters )
          throws IOException
      {
          super( url, parameters );
      }
      /**
       *  Get the corresponding Resource object for monitoring.
       */
      public Resource getResource()
          throws Exception
      {
          this.getInfos();
          if( this.isFile == true )
          {
              return new FileResource( this.systemId.substring( FILE.length() ) );
          }
          else
          {
              return new SourceResource( this );
          }
      }
  
  
  }
  
  
  
  1.4       +14 -20    jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/URLSource.java
  
  Index: URLSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/URLSource.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- URLSource.java	22 Apr 2002 09:24:45 -0000	1.3
  +++ URLSource.java	23 Apr 2002 15:35:27 -0000	1.4
  @@ -17,12 +17,6 @@
   import java.net.URLConnection;
   import java.util.Iterator;
   import java.util.Map;
  -/*
  -import org.apache.avalon.excalibur.monitor.FileResource;
  -import org.apache.avalon.excalibur.monitor.Monitorable;
  -import org.apache.avalon.excalibur.monitor.Resource;
  -import org.apache.avalon.excalibur.monitor.SourceResource;
  -*/
   import org.apache.excalibur.source.*;
   import org.apache.excalibur.source.impl.validity.TimeStampValidity;
   
  @@ -30,11 +24,11 @@
    * Description of a source which is described by an URL.
    *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.3 $ $Date: 2002/04/22 09:24:45 $
  + * @version CVS $Revision: 1.4 $ $Date: 2002/04/23 15:35:27 $
    */
   
  -public final class URLSource
  -    implements Source //, Monitorable
  +public class URLSource
  +    implements Source
   {
   
       /** With this parameter you can specify the method to use for a http request.
  @@ -48,31 +42,31 @@
       public final String REQUEST_PARAMETERS = "org.apache.avalon.excalibur.source.Source.request.parameters";
   
       /** Identifier for file urls */
  -    private final String FILE = "file:";
  +    protected final String FILE = "file:";
   
       /** The last modification date or 0 */
  -    private long lastModificationDate;
  +    protected long lastModificationDate;
   
       /** The system id */
  -    private String systemId;
  +    protected String systemId;
   
       /** The URL of the source */
  -    private URL url;
  +    protected URL url;
   
       /** The connection for a real URL */
  -    private URLConnection connection;
  +    protected URLConnection connection;
   
       /** Is this a file or a "real" URL */
  -    private boolean isFile;
  +    protected boolean isFile;
   
       /** Are we initialized? */
  -    private boolean gotInfos;
  +    protected boolean gotInfos;
   
       /** The <code>SourceParameters</code> used for a post*/
  -    private SourceParameters parameters;
  +    protected SourceParameters parameters;
   
       /** Is this a post? */
  -    private boolean isPost = false;
  +    protected boolean isPost = false;
   
       /**
        * Construct a new object from a <code>URL</code>.
  @@ -129,7 +123,7 @@
        * Get the last modification date and content length of the source.
        * Any exceptions are ignored.
        */
  -    private void getInfos()
  +    protected void getInfos()
       {
           if( !this.gotInfos )
           {
  @@ -285,7 +279,7 @@
        * Check if the <code>URL</code> class supports the getUserInfo()
        * method which is introduced in jdk 1.3
        */
  -    private String getUserInfo()
  +    protected String getUserInfo()
       {
           if( URLSource.checkedURLClass == true )
           {
  
  
  

--
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