|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectaQute.bnd.url.DefaultURLConnectionHandler
public class DefaultURLConnectionHandler
Base class for the URL Connection handlers. This class implements some
convenient methods like the matching. In general you should subclass and
implement handle(URLConnection). Be aware to call the
matches(URLConnection) method to verify the plugin is applicable.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface aQute.service.reporter.Reporter |
|---|
Reporter.SetLocation |
| Nested classes/interfaces inherited from interface aQute.service.reporter.Report |
|---|
Report.Location |
| Field Summary | |
|---|---|
protected Registry |
registry
|
| Fields inherited from interface aQute.bnd.service.url.URLConnectionHandler |
|---|
MATCH |
| Constructor Summary | |
|---|---|
DefaultURLConnectionHandler()
|
|
| Method Summary | |
|---|---|
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)
Create a warning. |
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)
Create a warning. |
Reporter.SetLocation |
warning(String format,
Object... args)
Create a warning. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Registry registry
| Constructor Detail |
|---|
public DefaultURLConnectionHandler()
| Method Detail |
|---|
public void handle(URLConnection connection)
throws Exception
handle in interface URLConnectionHandlerconnection - The connection to modify
Exceptionpublic boolean matches(URL url)
matches in interface URLConnectionHandlerurl - the url to match
protected boolean matches(URLConnection connection)
connection - The connection to match
public void setRegistry(Registry registry)
RegistryPlugin for convenience to our subclasses.
setRegistry in interface RegistryPlugin
public void setProperties(Map<String,String> map)
throws Exception
setProperties in interface Pluginmap - attributes and directives for this plugin's clause
Exceptionpublic void setReporter(Reporter processor)
Plugin
setReporter in interface Pluginpublic List<String> getWarnings()
Report
getWarnings in interface Reportpublic List<String> getErrors()
Report
getErrors in interface Reportpublic Report.Location getLocation(String msg)
Report
getLocation in interface Reportmsg - The message
public boolean isOk()
Report
isOk in interface Report
public Reporter.SetLocation error(String format,
Object... args)
Reporter
error in interface Reporterformat - The format of the errorargs - The arguments of the error
public Reporter.SetLocation warning(String format,
Object... args)
Reporter
warning in interface Reporterformat - The format of the errorargs - The arguments of the error
public void trace(String format,
Object... args)
Reporter
trace in interface Reporterformat - The format of the errorargs - The arguments of the error
public void progress(float progress,
String format,
Object... args)
Reporter
progress in interface Reporterprogress - A value between 0 and 1 indicating the progress. 0 is starting
and >=1 is done.format - The format of the errorargs - The arguments of the error
public Reporter.SetLocation exception(Throwable t,
String format,
Object... args)
Reporter
exception in interface Reportert - The exceptionargs - The argumentspublic boolean isPedantic()
Reporter
isPedantic in interface Reporter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||