org.apache.jetspeed.container.invoker
Class PortletInvokerFactoryImpl

java.lang.Object
  extended byorg.apache.jetspeed.container.invoker.PortletInvokerFactoryImpl
All Implemented Interfaces:
org.apache.pluto.factory.Factory, org.apache.pluto.factory.PortletInvokerFactory

public class PortletInvokerFactoryImpl
extends Object
implements org.apache.pluto.factory.PortletInvokerFactory

Portlet Invoker Factory creates portlet invokers based on the servlet context. This class is part of the contract between Pluto and the Jetspeed Portal as defined in the interfaces under org.apache.pluto.factory The Pluto container uses portlet invokers to abstract access to portlets. An invoker interfaces defines which actions are performed between the portal and container, namely action, render and optionally load. Portlet invoker factories are implemented by the portal implementation. The Pluto container uses pluggable portlet invoker factories in order to get portlet invokers, and then invoke methods on portlets (render, action, load).

The Portlet Invoker Factory is a Pluto factory. Pluto defines a basic lifecycle for Pluto factory services in the org.apach.pluto.factory.Factory interface with standard init and destroy methods.

The Jetspeed portlet invoker factory supports two kinds of invokers: local and servlet. Local portlet invokers call portlets located in the same web applications. With local invokers, a simple java method invocation is called on the portlet. Servlet portlet invokers call portlets located in another web application. With servlet invokers, the servlet request dispatcher is used to call methods on the portlet.

Version:
$Id: PortletInvokerFactoryImpl.java 225608 2005-07-27 20:27:50Z weaver $
Author:
David Sean Taylor

Field Summary
static String DEFAULT_MAPPING_NAME
           
static String INVOKER_SERVLET_MAPPING_NAME
           
private  JetspeedPortletInvoker localPortletInvoker
           
private static org.apache.commons.logging.Log log
           
private  PortalContext portalContext
           
private  org.apache.jetspeed.factory.PortletFactory portletFactory
           
private  javax.servlet.ServletConfig servletConfig
          The servlet configuration for the Jetspeed portal
private  JetspeedPortletInvoker servletPortletInvoker
           
 
Constructor Summary
PortletInvokerFactoryImpl(javax.servlet.ServletConfig servletConfig, PortalContext portalContext, org.apache.jetspeed.factory.PortletFactory portletFactory, JetspeedPortletInvoker servletPortletInvoker, JetspeedPortletInvoker localPortletInvoker)
           
 
Method Summary
 void destroy()
           
 org.apache.pluto.invoker.PortletInvoker getPortletInvoker(org.apache.pluto.om.portlet.PortletDefinition portletDefinition)
           
 void init(javax.servlet.ServletConfig config, Map properties)
           
 void releasePortletInvoker(org.apache.pluto.invoker.PortletInvoker invoker)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INVOKER_SERVLET_MAPPING_NAME

public static final String INVOKER_SERVLET_MAPPING_NAME
See Also:
Constant Field Values

DEFAULT_MAPPING_NAME

public static final String DEFAULT_MAPPING_NAME
See Also:
Constant Field Values

log

private static final org.apache.commons.logging.Log log

servletConfig

private final javax.servlet.ServletConfig servletConfig
The servlet configuration for the Jetspeed portal


portalContext

private final PortalContext portalContext

portletFactory

private final org.apache.jetspeed.factory.PortletFactory portletFactory

servletPortletInvoker

private final JetspeedPortletInvoker servletPortletInvoker

localPortletInvoker

private final JetspeedPortletInvoker localPortletInvoker
Constructor Detail

PortletInvokerFactoryImpl

public PortletInvokerFactoryImpl(javax.servlet.ServletConfig servletConfig,
                                 PortalContext portalContext,
                                 org.apache.jetspeed.factory.PortletFactory portletFactory,
                                 JetspeedPortletInvoker servletPortletInvoker,
                                 JetspeedPortletInvoker localPortletInvoker)
Method Detail

init

public void init(javax.servlet.ServletConfig config,
                 Map properties)
          throws Exception
Specified by:
init in interface org.apache.pluto.factory.Factory
Throws:
Exception

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface org.apache.pluto.factory.Factory
Throws:
Exception

getPortletInvoker

public org.apache.pluto.invoker.PortletInvoker getPortletInvoker(org.apache.pluto.om.portlet.PortletDefinition portletDefinition)
Specified by:
getPortletInvoker in interface org.apache.pluto.factory.PortletInvokerFactory

releasePortletInvoker

public void releasePortletInvoker(org.apache.pluto.invoker.PortletInvoker invoker)
Specified by:
releasePortletInvoker in interface org.apache.pluto.factory.PortletInvokerFactory


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.