Class InstallerBundleUpdateTask
java.lang.Object
org.apache.sling.installer.api.tasks.InstallTask
org.apache.sling.installer.core.impl.AbstractInstallTask
org.apache.sling.installer.core.impl.tasks.InstallerBundleUpdateTask
- All Implemented Interfaces:
Comparable<InstallTask>
public class InstallerBundleUpdateTask
extends org.apache.sling.installer.core.impl.AbstractInstallTask
Update the installer itself
-
Field Summary
Fields inherited from class org.apache.sling.installer.api.tasks.InstallTask
ASYNC_ATTR_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis is the heart of the task - it performs the actual task.Tasks are sorted according to this key.booleanIf this an asynchronous task it should returntrueThe OSGi installer will set the attributeInstallTask.ASYNC_ATTR_NAMEwith an integer value.Methods inherited from class org.apache.sling.installer.core.impl.AbstractInstallTask
getBundleContext, getBundleRefresher, getLogger, getTaskSupportMethods inherited from class org.apache.sling.installer.api.tasks.InstallTask
compareTo, equals, getResource, getResourceGroup, hashCode, setFinishedState, setFinishedState, setFinishedState, toString
-
Constructor Details
-
InstallerBundleUpdateTask
-
-
Method Details
-
execute
Description copied from class:InstallTaskThis is the heart of the task - it performs the actual task.- Specified by:
executein classInstallTask- Parameters:
ctx- The installation context.- See Also:
-
isAsynchronousTask
public boolean isAsynchronousTask()Description copied from class:InstallTaskIf this an asynchronous task it should returntrueThe OSGi installer will set the attributeInstallTask.ASYNC_ATTR_NAMEwith an integer value. The next time, after the asynchronous task has been run and the OSGi installer has restarted, this attribute will be set on the resource. Asynchronous tasks should only be used for tasks which require the OSGi installer to stop and force it to restart, like a bundle update of the installer itself or a system update. The OSGi installer stops itself for an asynchronous task and is not able to restart itself!- Overrides:
isAsynchronousTaskin classInstallTask- Returns:
- If this is a async request,
trueotherwisefalse
-
getSortKey
Description copied from class:InstallTaskTasks 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:
getSortKeyin classInstallTask- Returns:
- The sorting key.
-