Interface ServiceBuilderExtension

  • All Known Implementing Classes:
    AbstractServiceBuilderExtension, JAXWSServiceBuilderExtension, WSDLServiceBuilderExtension

    public interface ServiceBuilderExtension

    The interface ServiceBuilderExtension provides an extension point to org.apache.axis2.deployment.Deployer interface. During the deployment, a Deployer invoke all ServiceBuilderExtension instances associated with it and receive a list of org.apache.axis2.description.AxisService generated by one of above ServiceBuilderExtension instances.

    It is possible to register ServiceBuilderExtension for a org.apache.axis2.deployment.Deployer through the axis2.xml configuration file or one can can set ServiceBuilderExtension programtically.

    Example

     
               <deployer extension="extension" directory="custom-directory" class="Deployer implementation">
                  <serviceBuilderExtension name ="builderExtensionA" class="org.apache.axis2.BuilderExtensionA"/>
                  <serviceBuilderExtension name ="builderExtensionA" class="org.apache.axis2.BuilderExtensionB"/>
                  <serviceBuilderExtension name ="builderExtensionA" class="org.apache.axis2.BuilderExtensionC"/> 
          </deployer> 
     

    • To use ServiceBuilderExtension a custom Deployer must be extended from org.apache.axis2.deployment.AbstractDeployer class where org.apache.axis2.deployment.AbstractDeployer class register ServiceBuilderExtensions with underline Deployer instance.
    • Within deploy() method it is expected to call org.apache.axis2.deployment.AbstractDeployer#executeServiceBuilderExtensions method to receive list of AxisService instances generated by ServiceBuilderExtensions.
    • For a given deploymentFile, if a ServiceBuilderExtension could create a AxisService then stop execution of other ServiceBuilderExtensions registered and return the AxisService immediately to the base Deployer for the further processing.
    Since:
    1.7.0
    • Method Detail

      • init

        void init​(ConfigurationContext configurationContext)
        Initialize ServiceBuilderExtension instance. This method should be called when Initializing the base Deployer.
        Parameters:
        configurationContext - the configuration context
      • setDirectory

        void setDirectory​(String directory)