An EGL service binding gives the details necessary to access
an EGL service.
- Open the EGL Deployment Descriptor editor by double-clicking an
EGL deployment descriptor. For details about creating the file, see
“Creating an EGL deployment descriptor.”
- Click Service Bindings. The Service
Bindings Configuration tab is displayed.
- Click Add. The Add a Service
Binding page is displayed.
- Click EGL service binding and then click Next.
The Add an EGL Service Binding page is displayed.
- In the EGL service binding name field,
specify the service-binding name, which is also called a key. You
can type the name, but the following steps might save you time:
- Click the Browse button that is next to
the EGL service binding name field. The Interface
Selection window is displayed.
- Select the name of the Interface or Service part that can be the
basis of a service-access variable in your code.
- Click OK.
You specify the service-binding name when you declare a service-access
variable and set the @BindService property, bindingKey field.
- In the Service name field, type the package
and service name; for example, myPackage.MyService.
The Service part does not need to be in your workspace. However, if
you referenced a Service part when you browsed to the EGL service
binding name in the previous step, the name is already in the field.
- In the alias field, type the alias of the
EGL-generated service. If you leave this field blank, the value in
the Service name field is used for access.
- Choose a protocol type for the service binding:
- If you already defined a sharable protocol for the service, click Choose
from protocols and select the sharable protocol from the
list.
- Alternatively, choose a specific protocol type and specify the
related attributes. For details, see “Options for sharable protocols.”
- Click Finish. The Service Bindings
Configuration tab is available again. In the future, you
can update the service binding that you just defined:
- Open the Service Bindings Configuration tab.
- Select the binding.
- Edit the displayed information.