org.apache.servicemix.jbi.deployer.handler
Class JBIDeploymentListener

java.lang.Object
  extended by org.apache.servicemix.jbi.deployer.handler.JBIDeploymentListener
All Implemented Interfaces:
org.apache.felix.fileinstall.ArtifactListener, org.apache.felix.fileinstall.ArtifactTransformer

public class JBIDeploymentListener
extends Object
implements org.apache.felix.fileinstall.ArtifactTransformer

A JBI DeploymentListener which transforms plain JBI artifacts to OSGi bundles. The deployer will recognize zip and jar files containing a JBI descriptor and without any OSGi manifest entries.


Constructor Summary
JBIDeploymentListener()
           
 
Method Summary
 boolean canHandle(File artifact)
          Check if the file is a recognized JBI artifact that needs to be processed.
 File transform(File artifact, File tmpDir)
          Transform the file, which is a JBI artifact, into an OSGi bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBIDeploymentListener

public JBIDeploymentListener()
Method Detail

canHandle

public boolean canHandle(File artifact)
Check if the file is a recognized JBI artifact that needs to be processed.

Specified by:
canHandle in interface org.apache.felix.fileinstall.ArtifactListener
Parameters:
artifact - the file to check
Returns:
true is the file is a JBI artifact that should be transformed into an OSGi bundle.

transform

public File transform(File artifact,
                      File tmpDir)
Transform the file, which is a JBI artifact, into an OSGi bundle.

Specified by:
transform in interface org.apache.felix.fileinstall.ArtifactTransformer
Parameters:
artifact - the file to transform.
tmpDir - the location where the file should be stored.
Returns:
the location of the transformed OSGi bundle, or null if the transformation could not take place.


Copyright © 2005-2011 The Apache Software Foundation. All Rights Reserved.