Top Description Fields Constructors Methods
org.osgi.service.component.annotations

public final Enum ServiceScope

extends Enum<ServiceScope>
Class Inheritance

Service scope for the Component annotation.
Author
$Id: e9ca16a4448ac76d9c086b01f0ee16c5c62b006e $
Since
1.3

Field Summary

Modifier and TypeField and Description
public static final ServiceScope
BUNDLE

When the component is registered as a service, it must be registered as a bundle scope service and an instance of the component must be created for each bundle using the service.

public static final ServiceScope
DEFAULT

Default element value for annotation.

public static final ServiceScope
PROTOTYPE

When the component is registered as a service, it must be registered as a prototype scope service and an instance of the component must be created for each distinct request for the service.

public static final ServiceScope
SINGLETON

When the component is registered as a service, it must be registered as a bundle scope service but only a single instance of the component must be used for all bundles using the service.

private final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.

public static ServiceScope
public static ServiceScope[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

BUNDLEback to summary
public static final ServiceScope BUNDLE

When the component is registered as a service, it must be registered as a bundle scope service and an instance of the component must be created for each bundle using the service.

DEFAULTback to summary
public static final ServiceScope DEFAULT

Default element value for annotation. This is used to distinguish the default value for an element and should not otherwise be used.

PROTOTYPEback to summary
public static final ServiceScope PROTOTYPE

When the component is registered as a service, it must be registered as a prototype scope service and an instance of the component must be created for each distinct request for the service.

SINGLETONback to summary
public static final ServiceScope SINGLETON

When the component is registered as a service, it must be registered as a bundle scope service but only a single instance of the component must be used for all bundles using the service.

valueback to summary
private final String value

Constructor Detail

ServiceScopeback to summary
private ServiceScope(String value)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Returns:String

the name of this enum constant

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