org.sca4j.container.web.spi
Interface WebApplicationActivator


public interface WebApplicationActivator

Responsible for activating a web application in an embedded servlet container.

Version:
$Revision$ $Date$

Field Summary
static java.lang.String CONTEXT_ATTRIBUTE
           
static java.lang.String SERVLET_CONTEXT_SITE
           
static java.lang.String SESSION_CONTEXT_SITE
           
 
Method Summary
 javax.servlet.ServletContext activate(java.lang.String contextPath, java.net.URI uri, java.net.URI parentClassLoaderId, java.util.Map<java.lang.String,java.util.List<org.sca4j.pojo.reflection.Injector<?>>> injectors, org.oasisopen.sca.ComponentContext context)
          Perform the activation, which will result in making the web application available for incoming requests to the runtime.
 void deactivate(java.net.URI uri)
          Removes an activated web application
 java.lang.ClassLoader getWebComponentClassLoader(java.net.URI componentId)
          Returns the classloader to use for the web component corresponding the given id
 

Field Detail

SERVLET_CONTEXT_SITE

static final java.lang.String SERVLET_CONTEXT_SITE
See Also:
Constant Field Values

SESSION_CONTEXT_SITE

static final java.lang.String SESSION_CONTEXT_SITE
See Also:
Constant Field Values

CONTEXT_ATTRIBUTE

static final java.lang.String CONTEXT_ATTRIBUTE
See Also:
Constant Field Values
Method Detail

getWebComponentClassLoader

java.lang.ClassLoader getWebComponentClassLoader(java.net.URI componentId)
Returns the classloader to use for the web component corresponding the given id

Parameters:
componentId - the web component id
Returns:
the classloader

activate

javax.servlet.ServletContext activate(java.lang.String contextPath,
                                      java.net.URI uri,
                                      java.net.URI parentClassLoaderId,
                                      java.util.Map<java.lang.String,java.util.List<org.sca4j.pojo.reflection.Injector<?>>> injectors,
                                      org.oasisopen.sca.ComponentContext context)
                                      throws WebApplicationActivationException
Perform the activation, which will result in making the web application available for incoming requests to the runtime.

Parameters:
contextPath - the context path the web application will be available at. The context path is relative to the absolute address of the embedded servlet container.
uri - the URI of the contribution containing the web application assets
parentClassLoaderId - the id for parent classloader to use for the web application
injectors - the map of artifact ids to injectors. An artifact id identifies an artifact type such as a servlet class name or ServletContext.
context - the component context for the web component
Returns:
the servlet context associated with the activated web application
Throws:
WebApplicationActivationException - if an error occurs activating the web application

deactivate

void deactivate(java.net.URI uri)
                throws WebApplicationActivationException
Removes an activated web application

Parameters:
uri - the URI the web application was activated with
Throws:
WebApplicationActivationException - if an error occurs activating the web application


Copyright © 2008-2010 Service Symphony. All Rights Reserved.