|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.osgi.web.deployer.support.AbstractWarDeployer
public abstract class AbstractWarDeployer
Convenient base class offering common functionality for war deployers such as logging.
Field Summary | |
---|---|
protected Log |
log
logger |
Constructor Summary | |
---|---|
AbstractWarDeployer()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
protected abstract WarDeployment |
createDeployment(Bundle bundle,
String contextPath)
Creates and configures (but does not start) the web deployment for the given bundle. |
WarDeployment |
deploy(Bundle bundle,
String contextPath)
Deploys the given bundle as a WAR using the given context path. |
protected BundleContext |
getBundleContext()
Returns the bundle context used by this deployer. |
protected abstract String |
getServerInfo()
Returns a nice String representation of the underlying server for logging messages. |
void |
setBundleContext(BundleContext bundleContext)
Set the BundleContext that this bean runs in. |
protected abstract void |
startDeployment(WarDeployment deployment)
Starts the deployment artifact using the object returned by createDeployment(Bundle, String) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Log log
Constructor Detail |
---|
public AbstractWarDeployer()
Method Detail |
---|
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public void setBundleContext(BundleContext bundleContext)
BundleContextAware
BundleContext
that this bean runs in. Normally this can
be used to initialize an object.
setBundleContext
in interface BundleContextAware
bundleContext
- the BundleContext
object to be used
by this objectprotected BundleContext getBundleContext()
public WarDeployment deploy(Bundle bundle, String contextPath) throws OsgiWarDeploymentException
WEB-INF/web.xml
file in its bundle space. However,
implementations can chose to create a synthetic WAR or use
other configuration files instead.
Breaks down (and logs appropriately) the deployment process into:
deploy
in interface WarDeployer
bundle
- war bundlecontextPath
- the war context path
OsgiWarDeploymentException
- if something went wrong during
deploymentprotected abstract WarDeployment createDeployment(Bundle bundle, String contextPath) throws Exception
startDeployment(WarDeployment)
.
bundle
- OSGi bundle deployed as warcontextPath
- WAR context path
Exception
- if something goes wrong.protected abstract void startDeployment(WarDeployment deployment) throws Exception
createDeployment(Bundle, String)
.
deployment
- web deployment artifact
Exception
- if something goes wrongprotected abstract String getServerInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |