org.apache.sling.installer.core.impl.tasks
Class BundleStartTask

java.lang.Object
  extended by org.apache.sling.installer.api.tasks.InstallTask
      extended by org.apache.sling.installer.core.impl.AbstractInstallTask
          extended by 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


Constructor Summary
BundleStartTask(TaskResourceGroup r, long bundleId, BundleTaskCreator btc)
           
 
Method Summary
 void execute(InstallationContext ctx)
          This is the heart of the task - it performs the actual task.
 String getSortKey()
          Tasks are sorted according to this key.
static boolean isBundleActive(org.osgi.framework.Bundle b)
          Check if the bundle is active.
 String toString()
           
 
Methods inherited from class org.apache.sling.installer.core.impl.AbstractInstallTask
getLogger
 
Methods inherited from class org.apache.sling.installer.api.tasks.InstallTask
compareTo, equals, getResource, getResourceGroup, hashCode, setFinishedState
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BundleStartTask

public BundleStartTask(TaskResourceGroup r,
                       long bundleId,
                       BundleTaskCreator btc)
Method Detail

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.