Top Description Fields Constructors Methods
org.osgi.service.cdi

public final Enum ServiceScope

extends Enum<ServiceScope>
Class Inheritance
Imports
org.osgi.service.cdi.runtime.dto.template.ActivationTemplateDTO

Possible values for ActivationTemplateDTO#scope.
Author
$Id: 5254b6535bfa0424e7dae42e4178c57f384e55fb $

Field Summary

Modifier and TypeField and Description
public static final ServiceScope
BUNDLE

This activation will register an OSGi service with service.scope=bundle.

public static final ServiceScope
PROTOTYPE

This activation will register an OSGi service with service.scope=prototype.

public static final ServiceScope
SINGLETON

This activation will only ever create one instance

The instance is created after the parent component becomes satisfied and is destroyed before the parent component becomes unsatisfied.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ServiceScope
public static ServiceScope[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BUNDLEback to summary
public static final ServiceScope BUNDLE

This activation will register an OSGi service with 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.

PROTOTYPEback to summary
public static final ServiceScope PROTOTYPE

This activation will register an OSGi service with 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.

SINGLETONback to summary
public static final ServiceScope SINGLETON

This activation will only ever create one instance

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.

Constructor Detail

ServiceScopeback to summary
private ServiceScope()

Method Detail

valueOfback to summary
public static ServiceScope valueOf(String name)
valuesback to summary
public static ServiceScope[] values()