Bundle Activator Wizard: Services Page
This page of the wizard gathers information related to the services that
the bundle will import from the OSGi framework, and services that the
bundle will export to the OSGi framework.
-
Imported Services: Services that will be imported by the bundle
are listed here. Double clicking on the icon
causes the section to be maximized.
-
Service Name: This column contains the name of the service.
While the service name is always a fully qualified Java type name,
the wizard displays only the type name without the package
qualifier.
-
Filter: This column contains the optional LDAP filter that
will be used to acquire a service from the OSGi framework with
particular registered properties. The wizard validates the syntax
of the filter and will mark it with a
to indicate a
valid filter, or a
to indicate an
invalid filter.
-
Optional: Check this column if the service should be
considered optional. Optional services are more complicated to work
with and are rarely needed.
The following shortcut keys are supported:
-
Ctrl+A or INS: Add a service.
-
Ctrl+E or F2: Edit the selected service.
-
Ctrl+R or DEL: Remove the selected services.
-
Ctrl+O: Toggle the Optional checkbox for the selected
services.
-
Exported Services: Services that will be exported by the bundle
are listed here. Double clicking on the icon
causes the section to be maximized.
-
Service Name: This column contains the name of the service.
While the service name is always a fully qualified Java type name,
the wizard displays only the type name without the package
qualifier.
-
Implementation Class: This column optionally contains the
name of the implementation class for the named service. For the
selected row the wizard populates the column's drop-down list with
the classes in the project that implement the service interface.
-
Field: Check this column if you wish the service to be stored
in an instance field of the bundle activator. Under most
circumstances this is not necessary, although it can be useful for
performing custom behavior when the service is unregistered.
-
Properties: Check this column if the service should be
registered with the OSGi framework with properties. Properties are
used to distinguish one implementation of a service interface from
another.
-
Proxy: Check this column if the service should be registered
with the OSGi framework as a proxy. Proxy services are used to
delay the creation of the service until it is used for the first
time. Other uses of proxy services includes wrapping pre- and post-
invocation behavior around service APIs.
The following shortcut keys are supported:
-
Ctrl+A or INS: Add a service.
-
Ctrl+E or F2: Edit the selected service.
-
Ctrl+R or DEL: Remove the selected services.
-
Ctrl+I: Toggle the Field checkbox for the selected
services.
-
Ctrl+P: Toggle the Properties checkbox for the
selected services.
-
Ctrl+X: Toggle the Proxy checkbox for the selected
services.
-
Edit Type Scope: When a service is added or edited only
interfaces visible to the project are available by default. This
ensures that the code generated by the wizard will compile without
error. The Edit Type Scope... button allows you to adjust the
available types to include classes as well as interfaces, and types
visible to the entire workspace.
Describing imported
and exported services using classes is not recommended.
Copyright © 2001, 2007 IBM Corporation and others. All Rights Reserved.