|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axis2.deployment.DeploymentEngine
public abstract class DeploymentEngine
Field Summary | |
---|---|
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 |
wsToDeploy
Stores all the web Services to deploy. |
protected List |
wsToUnDeploy
Stores all the web Services to undeploy. |
Constructor Summary | |
---|---|
DeploymentEngine()
|
Method Summary | |
---|---|
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 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 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 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 |
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 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. |
protected MessageReceiver |
loadDefaultMessageReceiver(String mepURL,
AxisService service)
|
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 ArrayList |
populateService(AxisServiceGroup serviceGroup,
URL servicesURL,
String serviceName)
|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEPLOYMENT_TASK_RUNNING
protected static String webLocationString
protected Scheduler scheduler
protected boolean hotUpdate
protected boolean hotDeployment
protected List wsToDeploy
protected List wsToUnDeploy
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
Constructor Detail |
---|
public DeploymentEngine()
Method Detail |
---|
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
protected ArrayList populateService(AxisServiceGroup serviceGroup, URL servicesURL, String serviceName) throws DeploymentException
DeploymentException
protected MessageReceiver loadDefaultMessageReceiver(String mepURL, AxisService service)
public static void addNewModule(AxisModule modulemetadata, AxisConfiguration axisConfiguration) throws AxisFault
AxisFault
public static void addServiceGroup(AxisServiceGroup serviceGroup, ArrayList serviceList, URL serviceLocation, DeploymentFileData currentDeploymentFile, AxisConfiguration axisConfiguration) throws AxisFault
AxisFault
protected static boolean isServiceGroupReadyToDeploy(AxisServiceGroup serviceGroup, ArrayList 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 AxisConfiguration
AxisFault
protected static void fillServiceGroup(AxisServiceGroup serviceGroup, ArrayList 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.xml
DeploymentException
- : 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 name
public 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 Axis2
DeploymentException
- if there's a problemprotected void setDeploymentFeatures()
protected void prepareRepository(String repositoryName)
repositoryName
- the pathname of the repositoryprotected String getRepositoryPath(File repository)
protected ArrayList getFileList(URL fileListUrl)
public 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 deploying
DeploymentException
- if there's a problempublic static AxisServiceGroup buildServiceGroup(InputStream servicesxml, ClassLoader classLoader, String serviceGroupName, ConfigurationContext configCtx, ArchiveReader archiveReader, HashMap 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 services
AxisFault
- 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 void setDeployers(Map<String,Map<String,Deployer>> deployerMap)
public Map<String,Map<String,Deployer>> getDeployers()
public RepositoryListener getRepoListener()
public ServiceDeployer getServiceDeployer()
public ModuleDeployer getModuleDeployer()
public Deployer getDeployer(String directory, String extension)
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 Deployerpublic void removeDeployer(String directory, String extension)
directory
- the directory of deployablesextension
- the extension of deployables
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |