public class DefaultURLConnectionHandler extends 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(String format,
Object... args)
Create an error.
|
Reporter.SetLocation |
exception(Throwable t,
String format,
Object... args)
Dedicated message for an exception.
|
List<String> |
getErrors()
Return the errors.
|
Report.Location |
getLocation(String msg)
Return the errors for the given error or warning.
|
List<String> |
getWarnings()
Return the warnings.
|
void |
handle(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(URL url)
Verify if the URL matches one of our globs.
|
protected boolean |
matches(URLConnection connection)
Convenience method to make it easier to verify connections
|
void |
progress(float progress,
String format,
Object... args)
Deprecated.
Use SLF4J
Logger.info(aQute.libg.slf4j.GradleLogging.LIFECYCLE)
instead.
|
void |
setProperties(Map<String,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(String format,
Object... args)
Deprecated.
Use SLF4J Logger.debug instead.
|
Reporter.SetLocation |
warning(String format,
Object... args)
Create a warning.
|
protected Registry registry
public void handle(URLConnection connection) throws Exception
handle in interface URLConnectionHandlerconnection - The connection to modifyExceptionpublic boolean matches(URL url)
matches in interface URLConnectionHandlerurl - the url to matchprotected boolean matches(URLConnection connection)
connection - The connection to matchpublic void setRegistry(Registry registry)
RegistryPlugin for convenience to our subclasses.setRegistry in interface RegistryPluginpublic void setProperties(Map<String,String> map) throws Exception
setProperties in interface Pluginmap - attributes and directives for this plugin's clauseExceptionpublic void setReporter(Reporter processor)
PluginsetReporter in interface Pluginpublic List<String> getWarnings()
ReportgetWarnings in interface Reportpublic List<String> getErrors()
Reportpublic Report.Location getLocation(String msg)
ReportgetLocation in interface Reportmsg - The messagepublic boolean isOk()
Reportpublic Reporter.SetLocation error(String format, Object... args)
Reporterpublic Reporter.SetLocation warning(String format, Object... args)
Reporter@Deprecated public void trace(String format, Object... args)
Reporter@Deprecated public void progress(float progress, String format, Object... args)
Reporterpublic Reporter.SetLocation exception(Throwable t, String format, Object... args)
Reporterpublic boolean isPedantic()
ReporterisPedantic in interface ReporterCopyright © 2019 aQute SARL. All rights reserved.