public class WebAppController extends Object implements org.picocontainer.Startable
| Modifier and Type | Field and Description |
|---|---|
static QualifiedName |
HANDLER_PARAM
.
|
protected static org.gatein.common.logging.Logger |
log
.
|
| Constructor and Description |
|---|
WebAppController(org.exoplatform.container.xml.InitParams params)
Must have 'controller.config' as init parameter configuration (in xml)
that point to the controller.xml used to initialize navigation controller
This service component is a container for applications: PortalApplication, PortletApplication, StandaloneApplication....
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Application> |
addApplication(T app)
Add application (portlet, gadget) to the global application map if and only if it has not been registered yet.
|
String |
findRoutes(String uri) |
<T extends Application> |
getApplication(String appId) |
List<Application> |
getApplicationByType(String type) |
Object |
getAttribute(String name,
Object value) |
String |
getConfigurationPath() |
Router |
getRouter() |
void |
loadConfiguration(String path) |
void |
onHandlersInit(javax.servlet.ServletConfig config)
Delegate init action to handler, for example: PortalRequestHandler have
a change to create and register PortalApplication with WebAppController
|
void |
register(WebRequestHandler handler)
Register an handler as a component plugin, this method is invoked by the kernel with reflection.
|
void |
reloadConfiguration() |
void |
removeApplication(String appId) |
void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
This is the first method - in the GateIn portal - reached by incoming HTTP request, it acts like a servlet service()
method.
|
void |
start() |
void |
stop() |
void |
unregister(String[] paths) |
public static final QualifiedName HANDLER_PARAM
protected static org.gatein.common.logging.Logger log
public WebAppController(org.exoplatform.container.xml.InitParams params)
throws Exception
params - the init paramsException - any exceptionpublic <T extends Application> T getApplication(String appId)
public List<Application> getApplicationByType(String type)
public void removeApplication(String appId)
public String getConfigurationPath()
public void loadConfiguration(String path) throws IOException, RouterConfigException
IOExceptionRouterConfigExceptionpublic void reloadConfiguration()
throws RouterConfigException,
IOException
RouterConfigExceptionIOExceptionpublic <T extends Application> T addApplication(T app)
T - app - public void register(WebRequestHandler handler)
handler - the handlerpublic void unregister(String[] paths)
public void onHandlersInit(javax.servlet.ServletConfig config)
throws Exception
config - Exceptionpublic Router getRouter()
public void service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws Exception
This is the first method - in the GateIn portal - reached by incoming HTTP request, it acts like a servlet service() method. According to the servlet path used the correct handler is selected and then executed.
During a request the request life cycle is demarcated by calls to RequestLifeCycle.begin(ExoContainer) and
RequestLifeCycle.end().
req - the http requestres - the http responseException - any exceptionpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.StartableCopyright © 2018 JBoss by Red Hat. All Rights Reserved.