java.lang.Object
java.lang.Enum<ServiceScope>
org.osgi.service.component.annotations.ServiceScope
????????:
Serializable, Comparable<ServiceScope>

public enum ServiceScope extends Enum<ServiceScope>
Service scope for the Component annotation.
???????:
1.3
  • ??????

    ????
    ????
    ??
    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.
    Default element value for annotation.
    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.
    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.
  • ????

    ??????
    ??
    ??
     
    ?????????????????? ??????????????????? ????????(?????? ??????)
    static ServiceScope[]
    ???????????????, ??????????????

    ??????? java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • ????????

    • SINGLETON

      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.
    • BUNDLE

      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.
    • PROTOTYPE

      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.
    • DEFAULT

      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.
  • ??????