Class FrameworkStartLevelImpl.BundleStartLevelImpl
- java.lang.Object
-
- org.apache.felix.framework.FrameworkStartLevelImpl.BundleStartLevelImpl
-
- All Implemented Interfaces:
BundleReference
,BundleStartLevel
- Enclosing class:
- FrameworkStartLevelImpl
class FrameworkStartLevelImpl.BundleStartLevelImpl extends java.lang.Object implements BundleStartLevel
-
-
Field Summary
Fields Modifier and Type Field Description private BundleImpl
m_bundle
-
Constructor Summary
Constructors Modifier Constructor Description private
BundleStartLevelImpl(BundleImpl bundle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bundle
getBundle()
Returns theBundle
object associated with thisBundleReference
.int
getStartLevel()
Return the assigned start level value for the bundle.boolean
isActivationPolicyUsed()
Returns whether the bundle's autostart setting indicates that the activation policy declared in the bundle manifest must be used.boolean
isPersistentlyStarted()
Returns whether the bundle's autostart setting indicates it must be started.void
setStartLevel(int startlevel)
Assign a start level value to the bundle.
-
-
-
Field Detail
-
m_bundle
private BundleImpl m_bundle
-
-
Constructor Detail
-
BundleStartLevelImpl
private BundleStartLevelImpl(BundleImpl bundle)
-
-
Method Detail
-
getBundle
public Bundle getBundle()
Description copied from interface:BundleReference
Returns theBundle
object associated with thisBundleReference
.- Specified by:
getBundle
in interfaceBundleReference
- Returns:
- The
Bundle
object associated with thisBundleReference
.
-
getStartLevel
public int getStartLevel()
Description copied from interface:BundleStartLevel
Return the assigned start level value for the bundle.- Specified by:
getStartLevel
in interfaceBundleStartLevel
- Returns:
- The start level value of the bundle.
- See Also:
BundleStartLevel.setStartLevel(int)
-
setStartLevel
public void setStartLevel(int startlevel)
Description copied from interface:BundleStartLevel
Assign a start level value to the bundle.The bundle will be assigned the specified start level. The start level value assigned to the bundle will be persistently recorded by the Framework.
If the new start level for the bundle is lower than or equal to the active start level of the Framework and the bundle's autostart setting indicates this bundle must be started, the Framework will start the bundle as described in the
Bundle.start(int)
method using theBundle.START_TRANSIENT
option. TheBundle.START_ACTIVATION_POLICY
option must also be used ifBundleStartLevel.isActivationPolicyUsed()
returnstrue
. The actual starting of the bundle must occur asynchronously.If the new start level for the bundle is higher than the active start level of the Framework, the Framework will stop the bundle as described in the
Bundle.stop(int)
method using theBundle.STOP_TRANSIENT
option. The actual stopping of the bundle must occur asynchronously.- Specified by:
setStartLevel
in interfaceBundleStartLevel
- Parameters:
startlevel
- The new start level for the bundle.
-
isPersistentlyStarted
public boolean isPersistentlyStarted()
Description copied from interface:BundleStartLevel
Returns whether the bundle's autostart setting indicates it must be started.The autostart setting of a bundle indicates whether the bundle is to be started when its start level is reached.
- Specified by:
isPersistentlyStarted
in interfaceBundleStartLevel
- Returns:
true
if the autostart setting of the bundle indicates it is to be started.false
otherwise.- See Also:
Bundle.START_TRANSIENT
-
isActivationPolicyUsed
public boolean isActivationPolicyUsed()
Description copied from interface:BundleStartLevel
Returns whether the bundle's autostart setting indicates that the activation policy declared in the bundle manifest must be used.The autostart setting of a bundle indicates whether the bundle's declared activation policy is to be used when the bundle is started.
- Specified by:
isActivationPolicyUsed
in interfaceBundleStartLevel
- Returns:
true
if the bundle's autostart setting indicates the activation policy declared in the manifest must be used.false
if the bundle must be eagerly activated.- See Also:
Bundle.START_ACTIVATION_POLICY
-
-