org.duracloud.services.webapputil.internal
Class WebAppUtilImpl
java.lang.Object
org.duracloud.services.BaseService
org.duracloud.services.webapputil.internal.WebAppUtilImpl
- All Implemented Interfaces:
- ComputeService, WebAppUtil, org.osgi.service.cm.ManagedService
public class WebAppUtilImpl
- extends BaseService
- implements WebAppUtil, org.osgi.service.cm.ManagedService
This class abstracts the details of managing appservers used to host
DuraCloud services that run outside of an osgi-container.
- Author:
- Andrew Woods
Date: Nov 30, 2009
| Fields inherited from interface org.duracloud.services.ComputeService |
DELIM, ERROR_KEY, ERROR_REPORT_KEY, FAILURE_COUNT_KEY, ITEMS_PROCESS_COUNT, PASS_COUNT_KEY, REPORT_KEY, STARTTIME_KEY, STATUS_KEY, STOPTIME_KEY, SVC_LAUNCHING_USER, SYSTEM_PREFIX |
|
Method Summary |
URL |
deploy(String serviceId,
String portIndex,
InputStream war)
This method deploys the arg war to a newly created appserver under the
arg serviceId context. |
URL |
deploy(String serviceId,
String portIndex,
InputStream war,
Map<String,String> env)
This method deploys the arg war to a newly created appserver under the
arg serviceId context. |
URL |
filteredDeploy(String serviceId,
String portIndex,
InputStream war,
Map<String,String> env,
NamedFilterList filters)
This method deploys the arg war to a newly created appserver under the
arg serviceId context. |
int |
getInitialPort()
|
void |
setInitialPort(int initialPort)
|
void |
setTomcatUtil(TomcatUtil tomcatUtil)
|
void |
unDeploy(URL url)
This method undeploys the webapp currently deployed at the arg URL. |
void |
updated(Dictionary config)
|
| Methods inherited from class org.duracloud.services.BaseService |
addErrorReport, describe, doneWorking, getError, getErrorReportId, getServiceId, getServiceProps, getServiceStatus, getServiceWorkDir, getSvcLaunchingUser, setError, setErrorReportId, setErrorReportId, setReportId, setReportId, setServiceId, setServiceStatus, setServiceWorkDir, setSvcLaunchingUser, start, stop |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebAppUtilImpl
public WebAppUtilImpl()
deploy
public URL deploy(String serviceId,
String portIndex,
InputStream war)
- This method deploys the arg war to a newly created appserver under the
arg serviceId context.
- Specified by:
deploy in interface WebAppUtil
- Parameters:
serviceId - is the name of the context of deployed webappwar - to be deployedportIndex - offset from configured base port
- Returns:
- URL of deployed webapp
deploy
public URL deploy(String serviceId,
String portIndex,
InputStream war,
Map<String,String> env)
- This method deploys the arg war to a newly created appserver under the
arg serviceId context.
- Specified by:
deploy in interface WebAppUtil
- Parameters:
serviceId - is the name of the context of deployed webappwar - to be deployedenv - of tomcat that will be installed/started
- Returns:
- URL of deployed webapp
filteredDeploy
public URL filteredDeploy(String serviceId,
String portIndex,
InputStream war,
Map<String,String> env,
NamedFilterList filters)
- This method deploys the arg war to a newly created appserver under the
arg serviceId context.
- Specified by:
filteredDeploy in interface WebAppUtil
- Parameters:
serviceId - is the name of the context of deployed webappportIndex - offset from configured base portwar - to be deployedenv - of tomcat that will be installed/startedfilters - are names of files in the arg war to be filtered with
provided filters. Any filters that contain the strings
$DURA_HOST$ or $DURA_PORT$ will be swapped with the
host and port of the compute instance.
- Returns:
- URL of deployed webapp
unDeploy
public void unDeploy(URL url)
- This method undeploys the webapp currently deployed at the arg URL.
- Specified by:
unDeploy in interface WebAppUtil
- Parameters:
url - of the currently deployed webapp
getInitialPort
public int getInitialPort()
setInitialPort
public void setInitialPort(int initialPort)
setTomcatUtil
public void setTomcatUtil(TomcatUtil tomcatUtil)
updated
public void updated(Dictionary config)
throws org.osgi.service.cm.ConfigurationException
- Specified by:
updated in interface org.osgi.service.cm.ManagedService
- Throws:
org.osgi.service.cm.ConfigurationException
Copyright © 2009-2012 DuraSpace. All Rights Reserved.