public interface InventoryPrinter
InventoryPrinter
is 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
InventoryPrinter
service:
FORMAT
- the supported formatsTITLE
- the printer titleNAME
- the printer nameWEBCONSOLE
- whether to confine the printer to the Web ConsoleModifier and Type | Field and Description |
---|---|
static java.lang.String |
FORMAT
The property defining one or more supported formats.
|
static java.lang.String |
NAME
The unique name (or label) of the printer.
|
static java.lang.String |
SERVICE
The service name under which services of this class must be registered
to be picked for inclusion in the configuration report.
|
static java.lang.String |
TITLE
The title displayed by tools when this printer is used.
|
static java.lang.String |
WEBCONSOLE
The inventory printer feature has first class integration with the
Apache Felix Web Console.
|
Modifier and Type | Method and Description |
---|---|
void |
print(java.io.PrintWriter printWriter,
Format format,
boolean isZip)
Prints the configuration report to the given
printWriter . |
static final java.lang.String SERVICE
static final java.lang.String FORMAT
Format
class.
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 java.lang.String NAME
If this property is missing or an empty string, the name is constructed
from the string InventoryPrinter
and the service's
service.id
property.
static final java.lang.String TITLE
If this property is missing or an empty string, the NAME
value
is used as the title.
static final java.lang.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(java.io.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 ( FORMAT
)
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 © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"