public class DefaultURLConnectionHandler extends java.lang.Object implements URLConnectionHandler, Plugin, RegistryPlugin, Reporter
handle(URLConnection). Be aware to call the
matches(URLConnection) method to verify the plugin is applicable.Reporter.SetLocationReport.Location| Modifier and Type | Field and Description |
|---|---|
protected Registry |
registry |
MATCH| Constructor and Description |
|---|
DefaultURLConnectionHandler() |
| Modifier and Type | Method and Description |
|---|---|
Reporter.SetLocation |
error(java.lang.String format,
java.lang.Object... args)
Create an error.
|
Reporter.SetLocation |
exception(java.lang.Throwable t,
java.lang.String format,
java.lang.Object... args)
Dedicated message for an exception.
|
java.util.List<java.lang.String> |
getErrors()
Return the errors.
|
Report.Location |
getLocation(java.lang.String msg)
Return the errors for the given error or warning.
|
java.util.List<java.lang.String> |
getWarnings()
Return the warnings.
|
void |
handle(java.net.URLConnection connection)
Not doing anything is perfect ok
|
boolean |
isOk()
Check if this report has any relevant errors that should make the run
associated with this report invalid.
|
boolean |
isPedantic()
The provider of the reporter wants pedantic reporting, meaning every
possible warning should be reported.
|
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(Reporter processor)
Set the current reporter.
|
void |
trace(java.lang.String format,
java.lang.Object... args)
Deprecated.
Use SLF4J Logger.debug instead.
|
Reporter.SetLocation |
warning(java.lang.String format,
java.lang.Object... args)
Create a warning.
|
protected Registry registry
public void handle(java.net.URLConnection connection)
throws java.lang.Exception
handle in interface URLConnectionHandlerconnection - The connection to modifyjava.lang.Exceptionpublic boolean matches(java.net.URL url)
matches in interface URLConnectionHandlerurl - the url to matchprotected boolean matches(java.net.URLConnection connection)
connection - The connection to matchpublic void setRegistry(Registry registry)
RegistryPlugin for convenience to our subclasses.setRegistry in interface RegistryPluginpublic void setProperties(java.util.Map<java.lang.String,java.lang.String> map)
throws java.lang.Exception
setProperties in interface Pluginmap - attributes and directives for this plugin's clausejava.lang.Exceptionpublic void setReporter(Reporter processor)
PluginsetReporter in interface Pluginpublic java.util.List<java.lang.String> getWarnings()
ReportgetWarnings in interface Reportpublic java.util.List<java.lang.String> getErrors()
Reportpublic Report.Location getLocation(java.lang.String msg)
ReportgetLocation in interface Reportmsg - The messagepublic boolean isOk()
Reportpublic Reporter.SetLocation error(java.lang.String format, java.lang.Object... args)
Reporterpublic Reporter.SetLocation warning(java.lang.String format, java.lang.Object... args)
Reporter@Deprecated
public void trace(java.lang.String format,
java.lang.Object... args)
Reporter@Deprecated
public void progress(float progress,
java.lang.String format,
java.lang.Object... args)
Reporterpublic Reporter.SetLocation exception(java.lang.Throwable t, java.lang.String format, java.lang.Object... args)
Reporterpublic boolean isPedantic()
ReporterisPedantic in interface ReporterCopyright (c) aQute SARL (2000, 2017) and others. All Rights Reserved.