public abstract class DeploymentEngine extends Object implements DeploymentConstants
Modifier and Type | Field and Description |
---|---|
protected AxisConfiguration |
axisConfig
to keep a ref to engine register
this ref will pass to engine when it call start()
method
|
protected ConfigurationContext |
configContext |
static String |
DEPLOYMENT_TASK_RUNNING
Indicates that the deployment task is running
|
protected boolean |
hotDeployment
Support for hot deployment is controlled by this flag
|
protected boolean |
hotUpdate
Support for hot update is controlled by this flag
|
protected ModuleDeployer |
moduleDeployer |
protected File |
modulesDir |
protected String |
modulesPath |
protected RepositoryListener |
repoListener |
protected Scheduler |
scheduler |
protected ServiceDeployer |
serviceDeployer |
protected File |
servicesDir |
protected String |
servicesPath |
protected static String |
webLocationString |
protected List<DeploymentFileData> |
wsToDeploy
Stores all the web Services to deploy.
|
protected List<WSInfo> |
wsToUnDeploy
Stores all the web Services to undeploy.
|
ATTACHMENTS_LIFECYCLE_MANAGER, ATTRIBUTE_ACTIVATE, ATTRIBUTE_CLASS, ATTRIBUTE_DEFAULT_VERSION, ATTRIBUTE_LOCKED, ATTRIBUTE_NAME, ATTRIBUTE_NAMESPACE, ATTRIBUTE_PACKAGE, ATTRIBUTE_SCOPE, ATTRIBUTE_WSADDRESSING, AXIS2_CONFIGURATION_RESOURCE, AXIS2_CONFIGURATION_XML, AXIS2_REPO, BOOLEAN_FALSE, BOOLEAN_TRUE, DEPLOYER, DIRECTORY, DIRECTORY_AXIS2_HOME, DIRECTORY_CONF, EXTENSION, MAPPING, META_INF, MODULE_DRI_PATH, MODULE_PATH, MODULE_XML, PROPERTY_TEMP_DIR, RESOURCE_MODULES, SCHEMA, SCHEMA_ELEMENT_QUALIFIED, SCHEMA_NAME_SPACE, SEPARATOR_COLON, SEPARATOR_DOT, SERVICE_DIR_PATH, SERVICE_PATH, SERVICES_XML, SUFFIX_JAR, SUFFIX_MAR, SUFFIX_WSDL, TAG_AFTER, TAG_ALLOWOVERRIDE, TAG_ANTI_JAR_LOCKING, TAG_APPLIES_TO, TAG_AXISCONFIG, TAG_BEFORE, TAG_CLASS_NAME, TAG_CLUSTER, TAG_CONTENT_TYPE, TAG_CONTEXT, TAG_DEFAULT_MODULE_VERSION, TAG_DEFAULTS, TAG_DESCRIPTION, TAG_DISPATCH_ORDER, TAG_DISPATCHER, TAG_EXCLUDE, TAG_EXCLUDE_OPERATIONS, TAG_EXCLUDE_PROPERTIES, TAG_EXPOSE, TAG_EXTRACT_SERVICE_ARCHIVE, TAG_FLOW_IN, TAG_FLOW_IN_FAULT, TAG_FLOW_OUT, TAG_FLOW_OUT_FAULT, TAG_HANDLER, TAG_HOT_DEPLOYMENT, TAG_HOT_UPDATE, TAG_INCLUDE_PROPERTIES, TAG_LABEL, TAG_LIST_ID, TAG_LISTENER, TAG_MAPPING, TAG_MEP, TAG_MESSAGE, TAG_MESSAGE_BUILDER, TAG_MESSAGE_BUILDERS, TAG_MESSAGE_FORMATTER, TAG_MESSAGE_FORMATTERS, TAG_MESSAGE_RECEIVER, TAG_MESSAGE_RECEIVERS, TAG_MODULE, TAG_MODULE_CONFIG, TAG_NAMESPACES, TAG_NODE_MANAGER, TAG_OBJECT_SUPPLIER, TAG_OPERATION, TAG_ORDER, TAG_PACKAGE_NAME, TAG_PACKAGE2QNAME, TAG_PARAMETER, TAG_PHASE, TAG_PHASE_FIRST, TAG_PHASE_LAST, TAG_PHASE_ORDER, TAG_POLICY_ATTACHMENT, TAG_QNAME, TAG_REFERENCE, TAG_REPLICATION, TAG_SERVICE, TAG_SERVICE_BUILDER_EXTENSION, TAG_SERVICE_GROUP, TAG_STATE_MANAGER, TAG_SUPPORTED_POLICY_NAMESPACES, TAG_TARGET_RESOLVER, TAG_TARGET_RESOLVERS, TAG_THREAD_CONTEXT_MIGRATOR, TAG_THREAD_CONTEXT_MIGRATORS, TAG_TIMEOUT, TAG_TRANSACTION, TAG_TRANSACTION_CONFIGURATION_CLASS, TAG_TRANSPORT, TAG_TRANSPORT_RECEIVER, TAG_TRANSPORT_SENDER, TAG_TRANSPORTS, TAG_TYPE, TARGET_NAME_SPACE
Constructor and Description |
---|
DeploymentEngine() |
Modifier and Type | Method and Description |
---|---|
void |
addDeployer(Deployer deployer,
String directory,
String extension)
Add and initialize a new Deployer.
|
static void |
addNewModule(AxisModule modulemetadata,
AxisConfiguration axisConfiguration) |
static void |
addServiceGroup(AxisServiceGroup serviceGroup,
ArrayList<AxisService> serviceList,
URL serviceLocation,
DeploymentFileData currentDeploymentFile,
AxisConfiguration axisConfiguration) |
void |
addWSToDeploy(DeploymentFileData file) |
void |
addWSToUndeploy(WSInfo file) |
static AxisModule |
buildModule(File modulearchive,
AxisConfiguration config)
Builds an AxisModule for a given module archive file.
|
static AxisService |
buildService(InputStream serviceInputStream,
ConfigurationContext configCtx)
Fills an axisservice object using services.xml.
|
static AxisServiceGroup |
buildServiceGroup(InputStream servicesxml,
ClassLoader classLoader,
String serviceGroupName,
ConfigurationContext configCtx,
ArchiveReader archiveReader,
HashMap<String,AxisService> wsdlServices)
To build a AxisServiceGroup for a given services.xml
You have to add the created group into AxisConfig
|
void |
cleanup()
Clean up the mess
|
void |
doDeploy() |
void |
engageModules()
Checks if the modules, referred by server.xml, exist or that they are deployed.
|
protected static void |
fillServiceGroup(AxisServiceGroup serviceGroup,
ArrayList<AxisService> serviceList,
URL serviceLocation,
AxisConfiguration axisConfig) |
AxisConfiguration |
getAxisConfig()
Gets AxisConfiguration.
|
static String |
getAxisServiceName(String fileName)
Retrieves service name from the archive file name.
|
Deployer |
getDeployer(String directory,
String extension) |
Map<String,Map<String,Deployer>> |
getDeployers() |
protected ArrayList<String> |
getFileList(URL fileListUrl) |
AxisModule |
getModule(String moduleName) |
ModuleDeployer |
getModuleDeployer() |
File |
getModulesDir() |
RepositoryListener |
getRepoListener() |
File |
getRepositoryDir() |
protected String |
getRepositoryPath(File repository) |
ServiceDeployer |
getServiceDeployer() |
File |
getServicesDir() |
static String |
getWebLocationString() |
boolean |
isDeploymentTaskRunning()
Method to check whether the deployment task is currently running.
|
boolean |
isHotUpdate() |
protected static boolean |
isServiceGroupReadyToDeploy(AxisServiceGroup serviceGroup,
ArrayList<AxisService> serviceList,
URL serviceLocation,
DeploymentFileData currentDeploymentFile,
AxisConfiguration axisConfig)
Performs a check routine, in order to identify whether all the serviceGroup, service and
operation level modules are available.
|
void |
loadFromClassPath() |
void |
loadRepository(String repoDir) |
void |
loadRepositoryFromURL(URL repoURL) |
static AxisServiceGroup |
loadServiceGroup(File serviceFile,
ConfigurationContext configCtx) |
void |
loadServices() |
void |
loadServicesFromUrl(URL repoURL) |
AxisConfiguration |
populateAxisConfiguration(InputStream in)
To get AxisConfiguration for a given inputStream this method can be used.
|
protected void |
prepareRepository(String repositoryName)
Creates directories for modules/services, copies configuration xml from class loader if necessary
|
void |
removeDeployer(String directory,
String extension)
Remove any Deployer mapped for the given directory and extension
|
protected void |
setClassLoaders(String axis2repoURI)
To set the all the classLoader hierarchy this method can be used , the top most parent is
CCL then SCL(system Class Loader)
CCL
:
SCL
: :
MCCL SCCL
: :
MCL SCL
MCCL : module common class loader
SCCL : Service common class loader
MCL : module class loader
SCL : Service class loader
|
void |
setConfigContext(ConfigurationContext configContext) |
void |
setDeployers(Map<String,Map<String,Deployer>> deployerMap) |
protected void |
setDeploymentFeatures()
Sets hotDeployment and hot update.
|
static void |
setWebLocationString(String webLocationString) |
protected void |
startSearch(RepositoryListener listener)
Starts the Deployment engine to perform Hot deployment and so on.
|
void |
unDeploy() |
public static final String DEPLOYMENT_TASK_RUNNING
protected static String webLocationString
protected Scheduler scheduler
protected boolean hotUpdate
protected boolean hotDeployment
protected List<DeploymentFileData> wsToDeploy
protected AxisConfiguration axisConfig
protected ConfigurationContext configContext
protected RepositoryListener repoListener
protected String servicesPath
protected File servicesDir
protected String modulesPath
protected File modulesDir
protected ServiceDeployer serviceDeployer
protected ModuleDeployer moduleDeployer
public static void setWebLocationString(String webLocationString)
public void loadServices()
public void loadRepository(String repoDir) throws DeploymentException
DeploymentException
public void loadFromClassPath() throws DeploymentException
DeploymentException
public void loadServicesFromUrl(URL repoURL)
public void loadRepositoryFromURL(URL repoURL) throws DeploymentException
DeploymentException
public static void addNewModule(AxisModule modulemetadata, AxisConfiguration axisConfiguration) throws AxisFault
AxisFault
public static void addServiceGroup(AxisServiceGroup serviceGroup, ArrayList<AxisService> serviceList, URL serviceLocation, DeploymentFileData currentDeploymentFile, AxisConfiguration axisConfiguration) throws AxisFault
AxisFault
protected static boolean isServiceGroupReadyToDeploy(AxisServiceGroup serviceGroup, ArrayList<AxisService> serviceList, URL serviceLocation, DeploymentFileData currentDeploymentFile, AxisConfiguration axisConfig) throws AxisFault
serviceGroup
- the AxisServiceGroup we're checkingserviceList
- a List of AxisServices to checkserviceLocation
- the URL of the service (only used if there's a problem)currentDeploymentFile
- the current DeploymentFileData object (only used if there's a
problem)axisConfig
- the active AxisConfigurationAxisFault
protected static void fillServiceGroup(AxisServiceGroup serviceGroup, ArrayList<AxisService> serviceList, URL serviceLocation, AxisConfiguration axisConfig) throws AxisFault
AxisFault
public void addWSToDeploy(DeploymentFileData file)
file
- ArchiveFileDatapublic void addWSToUndeploy(WSInfo file)
file
- WSInfopublic void doDeploy()
public void engageModules() throws AxisFault
AxisFault
- : If smt goes wrongpublic AxisConfiguration populateAxisConfiguration(InputStream in) throws DeploymentException
in
- : InputStream to axis2.xmlDeploymentException
- : If something goes wrongprotected void startSearch(RepositoryListener listener)
listener
- : RepositoryListenerpublic boolean isDeploymentTaskRunning()
public void unDeploy()
public AxisConfiguration getAxisConfig()
AxisConfiguration
public static String getAxisServiceName(String fileName)
fileName
- the archive file namepublic AxisModule getModule(String moduleName) throws AxisFault
AxisFault
public boolean isHotUpdate()
public static String getWebLocationString()
protected void setClassLoaders(String axis2repoURI) throws DeploymentException
axis2repoURI
- : The repository folder of Axis2DeploymentException
- if there's a problemprotected void setDeploymentFeatures()
protected void prepareRepository(String repositoryName)
repositoryName
- the pathname of the repositorypublic void setConfigContext(ConfigurationContext configContext)
public static AxisModule buildModule(File modulearchive, AxisConfiguration config) throws DeploymentException
modulearchive
- : Actual module archive fileconfig
- : AxisConfiguration : for get classloaders etc..DeploymentException
- if there's a problempublic static AxisService buildService(InputStream serviceInputStream, ConfigurationContext configCtx) throws DeploymentException
serviceInputStream
- InputStream containing configuration dataconfigCtx
- the ConfigurationContext in which we're deployingDeploymentException
- if there's a problempublic static AxisServiceGroup buildServiceGroup(InputStream servicesxml, ClassLoader classLoader, String serviceGroupName, ConfigurationContext configCtx, ArchiveReader archiveReader, HashMap<String,AxisService> wsdlServices) throws AxisFault
servicesxml
- InputStream created from services.xml or equivalentclassLoader
- ClassLoader to useserviceGroupName
- name of the service groupconfigCtx
- the ConfigurationContext in which we're deployingarchiveReader
- the ArchiveReader we're working withwsdlServices
- Map of existing WSDL servicesAxisFault
- if there's a problempublic static AxisServiceGroup loadServiceGroup(File serviceFile, ConfigurationContext configCtx) throws AxisFault
AxisFault
public File getServicesDir()
public File getModulesDir()
public File getRepositoryDir()
public RepositoryListener getRepoListener()
public ServiceDeployer getServiceDeployer()
public ModuleDeployer getModuleDeployer()
public void cleanup()
public void addDeployer(Deployer deployer, String directory, String extension)
deployer
- Deployer object to be registereddirectory
- the directory which will be scanned for deployable artifactsextension
- the extension of the deployable artifacts for this DeployerCopyright © 2004–2018 The Apache Software Foundation. All rights reserved.