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.
-
Limit services to interface types: Checking this checkbox limits
the types that may be chosen as service types to interfaces. Unchecking
this checkbox allows both interfaces and classes to be chosesn as
service types.
Describing service types using classes is not recommended.
-
Limit services to types visible to the project: Checking this
checkbox limits the types that may be chosen as service types to those
visible to the project. Unchecking this checkbox allows all types in
the workspace to be chosen as a service type.
Choosing a type that
is not visible to the project will result in compilation errors that
must be fixed by updating the project's Plug-in Dependencies.
Copyright © 2001, 2009 IBM Corporation and others. All Rights Reserved.