org.apache.felix.deploymentadmin.spi
Class CommitResourceCommand
java.lang.Object
org.apache.felix.deploymentadmin.spi.Command
org.apache.felix.deploymentadmin.spi.CommitResourceCommand
- All Implemented Interfaces:
- Runnable
public class CommitResourceCommand
- extends Command
- implements Runnable
Command that commits all the resource processors that were added to the command.
Method Summary |
boolean |
addResourceProcessor(ResourceProcessor processor)
Add a resource processor, all resource processors that are added will be committed when the command is executed. |
void |
execute(DeploymentSessionImpl session)
Executes the command, the specified DeploymentSession can be used to obtain various
information about the deployment session which the command is part of. |
void |
rollback()
Rolls back all actions that were added through the addRollback(Runnable r) method (in reverse
adding order). |
void |
run()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommitResourceCommand
public CommitResourceCommand()
execute
public void execute(DeploymentSessionImpl session)
throws DeploymentException
- Description copied from class:
Command
- Executes the command, the specified
DeploymentSession
can be used to obtain various
information about the deployment session which the command is part of.
- Specified by:
execute
in class Command
- Parameters:
session
- The deployment session this command is part of.
- Throws:
DeploymentException
- Thrown if the command could not successfully execute.
rollback
public void rollback()
- Description copied from class:
Command
- Rolls back all actions that were added through the
addRollback(Runnable r)
method (in reverse
adding order). It is not guaranteed that the state of everything related to the command will be as if the
command was never executed, a best effort should be made though.
- Overrides:
rollback
in class Command
addResourceProcessor
public boolean addResourceProcessor(ResourceProcessor processor)
- Add a resource processor, all resource processors that are added will be committed when the command is executed.
- Parameters:
processor
- The resource processor to add.
- Returns:
- true if the resource processor was added, false if it was already added.
run
public void run()
- Specified by:
run
in interface Runnable
Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.