public enum ServiceScope extends java.lang.Enum<ServiceScope>
ActivationTemplateDTO.scope
.Enum Constant and Description |
---|
BUNDLE
This activation will register an OSGi service with
service.scope=bundle . |
PROTOTYPE
This activation will register an OSGi service with
service.scope=prototype . |
SINGLETON
This activation will only ever create one instance
|
Modifier and Type | Method and Description |
---|---|
static ServiceScope |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ServiceScope[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ServiceScope SINGLETON
The instance is created after the parent component becomes satisfied and is destroyed before the parent component becomes unsatisfied.
If ActivationTemplateDTO.serviceClasses
is not empty the instance
will be registered as an OSGi service with
service.scope=singleton
.
public static final ServiceScope BUNDLE
service.scope=bundle
.
The service is registered just after all SINGLETON
activations
are set up and just before all SINGLETON
activations are torn
down.
The ActivationTemplateDTO.serviceClasses
is not empty when this
scope is used.
public static final ServiceScope PROTOTYPE
service.scope=prototype
.
The service is registered just after all SINGLETON
activations
are set up and just before all SINGLETON
activations are torn
down.
The ActivationTemplateDTO.serviceClasses
is not empty when this
scope is used.
public static ServiceScope[] values()
for (ServiceScope c : ServiceScope.values()) System.out.println(c);
public static ServiceScope valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullCopyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0