public class AsyncWrapperInstallTask extends InstallTask
ASYNC_ATTR_NAME
Constructor and Description |
---|
AsyncWrapperInstallTask(InstallTask delegatee) |
Modifier and Type | Method and Description |
---|---|
void |
execute(InstallationContext ctx)
This is the heart of the task - it performs the actual task.
|
TaskResource |
getResource()
Return the corresponding resource - depending on the task this might be null.
|
TaskResourceGroup |
getResourceGroup()
Return the corresponding resource - depending on the task this might be null.
|
String |
getSortKey()
Tasks are sorted according to this key.
|
boolean |
isAsynchronousTask()
If this an asynchronous task it should return
true
The OSGi installer will set the attribute InstallTask.ASYNC_ATTR_NAME
with an integer value. |
void |
setFinishedState(ResourceState state)
Set the finished state for the resource.
|
void |
setFinishedState(ResourceState state,
String alias)
Set the finished state for the resource and the alias
|
String |
toString() |
compareTo, equals, hashCode
public AsyncWrapperInstallTask(InstallTask delegatee)
public void execute(InstallationContext ctx)
InstallTask
execute
in class InstallTask
ctx
- The installation context.public String getSortKey()
InstallTask
getSortKey
in class InstallTask
public TaskResource getResource()
InstallTask
getResource
in class InstallTask
public TaskResourceGroup getResourceGroup()
InstallTask
getResourceGroup
in class InstallTask
public void setFinishedState(ResourceState state)
InstallTask
setFinishedState
in class InstallTask
state
- The new state.public void setFinishedState(ResourceState state, String alias)
InstallTask
setFinishedState
in class InstallTask
state
- The new state.alias
- The new aliaspublic String toString()
toString
in class InstallTask
public boolean isAsynchronousTask()
InstallTask
true
The OSGi installer will set the attribute InstallTask.ASYNC_ATTR_NAME
with 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!isAsynchronousTask
in class InstallTask
true
otherwise false
Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.