Package org.apache.axis2.deployment
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,AxisService>
buildAxisServices(DeploymentFileData deploymentFileData)
Builds the AxisService.void
init(ConfigurationContext configurationContext)
Initialize ServiceBuilderExtension instance.void
setDirectory(String directory)
-
-
-
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
-
buildAxisServices
Map<String,AxisService> buildAxisServices(DeploymentFileData deploymentFileData) throws DeploymentException
Builds the AxisService.- Parameters:
deploymentFileData
- the deployment file data *- Returns:
- the map of AxisService instances.
- Throws:
DeploymentException
- the deployment exception
-
setDirectory
void setDirectory(String directory)
-
-