Package aQute.bnd.url

Class DefaultURLConnectionHandler

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface aQute.service.reporter.Report

        aQute.service.reporter.Report.Location
      • Nested classes/interfaces inherited from interface aQute.service.reporter.Reporter

        aQute.service.reporter.Reporter.SetLocation
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      aQute.service.reporter.Reporter.SetLocation error​(java.lang.String format, java.lang.Object... args)  
      aQute.service.reporter.Reporter.SetLocation exception​(java.lang.Throwable t, java.lang.String format, java.lang.Object... args)  
      java.util.List<java.lang.String> getErrors()  
      aQute.service.reporter.Report.Location getLocation​(java.lang.String msg)  
      java.util.List<java.lang.String> getWarnings()  
      void handle​(java.net.URLConnection connection)
      Not doing anything is perfect ok
      boolean isOk()  
      boolean isPedantic()  
      boolean matches​(java.net.URL url)
      Verify if the URL matches one of our globs.
      protected boolean matches​(java.net.URLConnection connection)
      Convenience method to make it easier to verify connections
      void progress​(float progress, java.lang.String format, java.lang.Object... args)
      Deprecated.
      Use SLF4J Logger.info(aQute.libg.slf4j.GradleLogging.LIFECYCLE) instead.
      void setProperties​(java.util.Map<java.lang.String,​java.lang.String> map)
      Set the properties for this plugin.
      void setRegistry​(Registry registry)
      We are a @link RegistryPlugin for convenience to our subclasses.
      void setReporter​(aQute.service.reporter.Reporter processor)
      Set the current reporter.
      void trace​(java.lang.String format, java.lang.Object... args)
      Deprecated.
      Use SLF4J Logger.debug instead.
      aQute.service.reporter.Reporter.SetLocation warning​(java.lang.String format, java.lang.Object... args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

    • Constructor Detail

      • DefaultURLConnectionHandler

        public DefaultURLConnectionHandler()
    • Method Detail

      • handle

        public void handle​(java.net.URLConnection connection)
                    throws java.lang.Exception
        Not doing anything is perfect ok
        Specified by:
        handle in interface URLConnectionHandler
        Parameters:
        connection - The connection to modify
        Throws:
        java.lang.Exception
      • matches

        public boolean matches​(java.net.URL url)
        Verify if the URL matches one of our globs. If there are no globs, we always return true.
        Specified by:
        matches in interface URLConnectionHandler
        Parameters:
        url - the url to match
        Returns:
        true if matched, false if not.
      • matches

        protected boolean matches​(java.net.URLConnection connection)
        Convenience method to make it easier to verify connections
        Parameters:
        connection - The connection to match
        Returns:
        true if this connection should be handled.
      • setProperties

        public void setProperties​(java.util.Map<java.lang.String,​java.lang.String> map)
                           throws java.lang.Exception
        Set the properties for this plugin. Subclasses should call this method before they handle their own properties.
        Specified by:
        setProperties in interface Plugin
        Parameters:
        map - attributes and directives for this plugin's clause
        Throws:
        java.lang.Exception
      • setReporter

        public void setReporter​(aQute.service.reporter.Reporter processor)
        Description copied from interface: Plugin
        Set the current reporter. This is called at init time. This plugin should report all errors and warnings to this reporter.
        Specified by:
        setReporter in interface Plugin
      • getWarnings

        public java.util.List<java.lang.String> getWarnings()
        Specified by:
        getWarnings in interface aQute.service.reporter.Report
      • getErrors

        public java.util.List<java.lang.String> getErrors()
        Specified by:
        getErrors in interface aQute.service.reporter.Report
      • getLocation

        public aQute.service.reporter.Report.Location getLocation​(java.lang.String msg)
        Specified by:
        getLocation in interface aQute.service.reporter.Report
      • isOk

        public boolean isOk()
        Specified by:
        isOk in interface aQute.service.reporter.Report
      • error

        public aQute.service.reporter.Reporter.SetLocation error​(java.lang.String format,
                                                                 java.lang.Object... args)
        Specified by:
        error in interface aQute.service.reporter.Reporter
      • warning

        public aQute.service.reporter.Reporter.SetLocation warning​(java.lang.String format,
                                                                   java.lang.Object... args)
        Specified by:
        warning in interface aQute.service.reporter.Reporter
      • trace

        @Deprecated
        public void trace​(java.lang.String format,
                          java.lang.Object... args)
        Deprecated.
        Use SLF4J Logger.debug instead.
        Specified by:
        trace in interface aQute.service.reporter.Reporter
      • progress

        @Deprecated
        public void progress​(float progress,
                             java.lang.String format,
                             java.lang.Object... args)
        Deprecated.
        Use SLF4J Logger.info(aQute.libg.slf4j.GradleLogging.LIFECYCLE) instead.
        Specified by:
        progress in interface aQute.service.reporter.Reporter
      • exception

        public aQute.service.reporter.Reporter.SetLocation exception​(java.lang.Throwable t,
                                                                     java.lang.String format,
                                                                     java.lang.Object... args)
        Specified by:
        exception in interface aQute.service.reporter.Reporter
      • isPedantic

        public boolean isPedantic()
        Specified by:
        isPedantic in interface aQute.service.reporter.Reporter