org.apache.pluto
Interface PortletContainer

All Known Implementing Classes:
PortletContainerImpl

public interface PortletContainer

The PortletContainer interface is the entrance point of the portlet container. This singleton is normally called by the aggregation in a specific order, meaning that each method of this singleton has to be called in a defined way.

The base functionality of the portlet container can be enhanced or even modified by PortletContainerServices.

The methods of this class have to be called in the following order:

Version:
$Id: PortletContainer.java 156743 2005-03-10 05:50:30Z ddewolf $

Method Summary
 void init(java.lang.String uniqueContainerName, javax.servlet.ServletConfig servletConfig, PortletContainerEnvironment environment, java.util.Properties properties)
          Initializes the portlet container.
 boolean isInitialized()
          Returns whether the container is already initialized or not.
 void portletLoad(PortletWindow portletWindow, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
          Indicates that the portlet must be initialized
 void processPortletAction(PortletWindow portletWindow, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Indicates that a portlet action occured in the current request and calls the processAction method of this portlet.
 void renderPortlet(PortletWindow portletWindow, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Calls the render method of the given portlet window.
 void shutdown()
          Shuts down the portlet container.
 

Method Detail

init

void init(java.lang.String uniqueContainerName,
          javax.servlet.ServletConfig servletConfig,
          PortletContainerEnvironment environment,
          java.util.Properties properties)
          throws PortletContainerException
Initializes the portlet container.

Parameters:
uniqueContainerName - container name that must be unqiue across all containers defined within this JVM. This name must be identical across JVMs.
servletConfig - the servlet configuration
environment - the portlet container environment including all services
properties - the portlet container specific properties may vary from container to container
Throws:
PortletContainerException - if an error occurs while initializing the container

shutdown

void shutdown()
              throws PortletContainerException
Shuts down the portlet container. After calling this method it is no longer valid to call any method on the portlet container.

Throws:
PortletContainerException - if an error occurs while shutting down the container

renderPortlet

void renderPortlet(PortletWindow portletWindow,
                   javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
                   throws javax.portlet.PortletException,
                          java.io.IOException,
                          PortletContainerException
Calls the render method of the given portlet window.

Parameters:
portletWindow - the portlet Window
request - the servlet request
response - the servlet response
Throws:
javax.portlet.PortletException - if one portlet has trouble fulfilling the request
java.io.IOException - if the streaming causes an I/O problem
PortletContainerException - if the portlet container implementation has trouble fulfilling the request

processPortletAction

void processPortletAction(PortletWindow portletWindow,
                          javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                          throws javax.portlet.PortletException,
                                 java.io.IOException,
                                 PortletContainerException
Indicates that a portlet action occured in the current request and calls the processAction method of this portlet.

Parameters:
portletWindow - the portlet Window
request - the servlet request
response - the servlet response
Throws:
javax.portlet.PortletException - if one portlet has trouble fulfilling the request
PortletContainerException - if the portlet container implementation has trouble fulfilling the request
java.io.IOException

portletLoad

void portletLoad(PortletWindow portletWindow,
                 javax.servlet.http.HttpServletRequest servletRequest,
                 javax.servlet.http.HttpServletResponse servletResponse)
                 throws javax.portlet.PortletException,
                        PortletContainerException
Indicates that the portlet must be initialized

Parameters:
portletWindow - the portlet Window
servletRequest - the servlet request
servletResponse - the servlet response
Throws:
javax.portlet.PortletException - if one portlet has trouble fulfilling the request
PortletContainerException - if the portlet container implementation has trouble fulfilling the request

isInitialized

boolean isInitialized()
Returns whether the container is already initialized or not.

Returns:
true if the container is initialized


Copyright © 2003-2010 . All Rights Reserved.