A component instance can receive a BeanServiceObjects object via a
reference that is typed BeanServiceObjects.
For services with prototype scope, multiple
service objects for the service can be obtained. For services with
singleton or bundle scope, only one, use-counted service object is available.
Any unreleased service objects obtained from this BeanServiceObjects
object are automatically released by Service Component Runtime when the
service becomes unbound.
ServiceObjects
| Modifier and Type | Method and Description |
|---|---|
| public S | Returns: A service object for the associated service ornull if
the service is unbound, the customized service object returned by
a ServiceFactory does not implement the classes under
which it was registered or the ServiceFactory threw an
exception.Returns a service object for the |
| public ServiceReference | getServiceReference()
Returns the |
| public void | ungetService(S
A service object previously provided by this
service)ReferenceServiceObjects object.Releases a service object for the |
| getService | back to summary |
|---|---|
| public S getService() Returns a service object for the
This method will always return
| |
| getServiceReference | back to summary |
|---|---|
| public ServiceReference Returns the
| |
| ungetService | back to summary |
|---|---|
| public void ungetService(S service) Releases a service object for the The specified service object must no longer be used and all references to it should be destroyed after calling this method.
| |