public interface InventoryPrinter
InventoryPrinteris a service interface to be implemented by providers which want to hook into the display of the current configuration and state of the OSGi framework and application.
The following service registration properties further declare the
|Modifier and Type||Field and Description|
The property defining one or more supported formats.
The unique name (or label) of the printer.
The service name under which services of this class must be registered to be picked for inclusion in the configuration report.
The title displayed by tools when this printer is used.
The inventory printer feature has first class integration with the Apache Felix Web Console.
static final String SERVICE
static final String FORMAT
Any unknown formats are ignored. If this property is not declared or does
not declare any known formats, the
Format.TEXT format is assumed
as the printer's supported format.
static final String NAME
If this property is missing or an empty string, the name is constructed
from the string
InventoryPrinter and the service's
static final String TITLE
If this property is missing or an empty string, the
is used as the title.
static final String WEBCONSOLE
By default, a printer is displayed in the web console, unless this
property is set to
false. The property value can either be a
boolean or a string.
void print(PrintWriter printWriter, Format format, boolean isZip)
printWriter. Implementations are free to print whatever information they deem useful.
If a printer is invoked with a format it doesn't support (
the printer should just do/print nothing and directly return.
A printer might be used in one of two different situations: either for directly displaying the information to a user (like in the web console) or the output is included in a ZIP. The printer might want to return different output depending on the usage situation.
printWriter- where to write the data. Implementations may flush the writer but must not close it.
format- The render format.
isZip- whether this is included in a ZIP file or used directly
Copyright © 2006–2013 The Apache Software Foundation. All rights reserved.