public class DefaultURLConnectionHandler extends java.lang.Object implements URLConnectionHandler, Plugin, RegistryPlugin, aQute.service.reporter.Reporter
handle(URLConnection)
. Be aware to call the
matches(URLConnection)
method to verify the plugin is applicable.Modifier and Type | Field and Description |
---|---|
protected Registry |
registry |
MATCH
Constructor and Description |
---|
DefaultURLConnectionHandler() |
Modifier and Type | Method and 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) |
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) |
aQute.service.reporter.Reporter.SetLocation |
warning(java.lang.String format,
java.lang.Object... args) |
protected Registry registry
public void handle(java.net.URLConnection connection) throws java.lang.Exception
handle
in interface URLConnectionHandler
connection
- The connection to modifyjava.lang.Exception
public boolean matches(java.net.URL url)
matches
in interface URLConnectionHandler
url
- 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 RegistryPlugin
public void setProperties(java.util.Map<java.lang.String,java.lang.String> map) throws java.lang.Exception
setProperties
in interface Plugin
map
- attributes and directives for this plugin's clausejava.lang.Exception
public void setReporter(aQute.service.reporter.Reporter processor)
Plugin
setReporter
in interface Plugin
public java.util.List<java.lang.String> getWarnings()
getWarnings
in interface aQute.service.reporter.Report
public java.util.List<java.lang.String> getErrors()
getErrors
in interface aQute.service.reporter.Report
public aQute.service.reporter.Report.Location getLocation(java.lang.String msg)
getLocation
in interface aQute.service.reporter.Report
public boolean isOk()
isOk
in interface aQute.service.reporter.Report
public aQute.service.reporter.Reporter.SetLocation error(java.lang.String format, java.lang.Object... args)
error
in interface aQute.service.reporter.Reporter
public aQute.service.reporter.Reporter.SetLocation warning(java.lang.String format, java.lang.Object... args)
warning
in interface aQute.service.reporter.Reporter
public void trace(java.lang.String format, java.lang.Object... args)
trace
in interface aQute.service.reporter.Reporter
public void progress(float progress, java.lang.String format, java.lang.Object... args)
progress
in interface aQute.service.reporter.Reporter
public aQute.service.reporter.Reporter.SetLocation exception(java.lang.Throwable t, java.lang.String format, java.lang.Object... args)
exception
in interface aQute.service.reporter.Reporter
public boolean isPedantic()
isPedantic
in interface aQute.service.reporter.Reporter