|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.deployment.rp.autoconf.AutoConfResourceProcessor
public class AutoConfResourceProcessor
Constructor Summary | |
---|---|
AutoConfResourceProcessor()
|
Method Summary | |
---|---|
void |
begin(DeploymentSession session)
Called when the Deployment Admin starts a new operation on the given deployment package, and the resource processor is associated a resource within the package. |
void |
cancel()
Processing of a resource passed to the resource processor may take long. |
void |
commit()
Called when the processing of the current deployment package is finished. |
void |
dropAllResources()
This method is called during an "uninstall" deployment session. |
void |
dropped(String name)
Called when a resource, associated with a particular resource processor, had belonged to an earlier version of a deployment package but is not present in the current version of the deployment package. |
void |
prepare()
This method is called on the Resource Processor immediately before calling the commit method. |
void |
process(String name,
InputStream stream)
Called when a resource is encountered in the deployment package for which this resource processor has been selected to handle the processing of that resource. |
void |
rollback()
Called when the processing of the current deployment package is finished. |
void |
start()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AutoConfResourceProcessor()
Method Detail |
---|
public void start() throws IOException
IOException
public void begin(DeploymentSession session)
ResourceProcessor
begin
in interface ResourceProcessor
session
- object that represents the current session to the resource processorDeploymentSession
public void process(String name, InputStream stream) throws ResourceProcessorException
ResourceProcessor
process
in interface ResourceProcessor
name
- The name of the resource relative to the deployment package root directory.stream
- The stream for the resource.
ResourceProcessorException
- if the resource cannot be processed. Only
ResourceProcessorException.CODE_RESOURCE_SHARING_VIOLATION
and
ResourceProcessorException.CODE_OTHER_ERROR
error codes are allowed.public void dropped(String name) throws ResourceProcessorException
ResourceProcessor
dropped
in interface ResourceProcessor
name
- the name of the resource to drop (it is the same as the value of the
"Name" attribute in the deployment package's manifest)
ResourceProcessorException
- if the resource is not allowed to be dropped. Only the
ResourceProcessorException.CODE_OTHER_ERROR
error code is allowedpublic void dropAllResources() throws ResourceProcessorException
ResourceProcessor
dropAllResources
in interface ResourceProcessor
ResourceProcessorException
- if all resources could not be dropped. Only the
ResourceProcessorException.CODE_OTHER_ERROR
is allowed.public void prepare() throws ResourceProcessorException
ResourceProcessor
commit
method. The Resource Processor has to check whether it is able
to commit the operations since the last begin
method call. If it determines
that it is not able to commit the changes, it has to raise a
ResourceProcessorException
with the ResourceProcessorException.CODE_PREPARE
error code.
prepare
in interface ResourceProcessor
ResourceProcessorException
- if the resource processor is able to determine it is
not able to commit. Only the ResourceProcessorException.CODE_PREPARE
error
code is allowed.public void commit()
ResourceProcessor
commit
in interface ResourceProcessor
public void rollback()
ResourceProcessor
rollback
in interface ResourceProcessor
public void cancel()
ResourceProcessor
cancel()
method notifies the resource processor that it should
interrupt the processing of the current resource. This method is called by the
DeploymentAdmin
implementation after the
DeploymentAdmin.cancel()
method is called.
cancel
in interface ResourceProcessor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |