org.apache.sling.installer.core.impl.tasks
Class BundleStartTask
java.lang.Object
org.apache.sling.installer.api.tasks.InstallTask
org.apache.sling.installer.core.impl.AbstractInstallTask
org.apache.sling.installer.core.impl.tasks.BundleStartTask
- All Implemented Interfaces:
- Comparable<InstallTask>
public class BundleStartTask
- extends AbstractInstallTask
Start a bundle given its bundle ID
Restarts if the bundle does not start on the first try,
but only after receiving a bundle or framework event,
indicating that it's worth retrying
BundleStartTask
public BundleStartTask(TaskResourceGroup r,
long bundleId,
BundleTaskCreator btc)
getSortKey
public String getSortKey()
- Description copied from class:
InstallTask
- Tasks are sorted according to this key.
Therefore this key must uniquely identify this task.
A typical sort key contains the entity id of the resource
in execution.
- Specified by:
getSortKey
in class InstallTask
toString
public String toString()
- Overrides:
toString
in class InstallTask
isBundleActive
public static boolean isBundleActive(org.osgi.framework.Bundle b)
- Check if the bundle is active.
This is true if the bundle has the active state or of the bundle
is in the starting state and has the lazy activation policy.
Or if the bundle is a fragment, it's considered active as well
execute
public void execute(InstallationContext ctx)
- Description copied from class:
InstallTask
- This is the heart of the task - it performs the actual task.
- Specified by:
execute
in class InstallTask
- Parameters:
ctx
- The installation context.- See Also:
InstallTask.execute(org.apache.sling.installer.api.tasks.InstallationContext)
Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.