org.apache.jetspeed.container.invoker
Class LocalPortletInvoker

java.lang.Object
  extended by org.apache.jetspeed.container.invoker.LocalPortletInvoker
All Implemented Interfaces:
JetspeedPortletInvoker, org.apache.pluto.invoker.PortletInvoker

public class LocalPortletInvoker
extends Object
implements JetspeedPortletInvoker

LocalPortletInvoker invokes local (internal) portlet applications. Local portlet applications are stored within the Jetspeed Portlet application. They are not separate web applications; but are stored under Jetspeed's WEB-INF/apps directory.

Sample Configuration

 
 factory.invoker.local = org.apache.jetspeed.container.invoker.LocalPortletInvoker
 factory.invoker.local.pool.size = 50
  
 

Version:
$Id: LocalPortletInvoker.java 565870 2007-08-14 19:40:03Z taylor $
Author:
David Sean Taylor

Field Summary
protected  boolean activated
           
protected  javax.servlet.ServletConfig jetspeedConfig
           
protected  javax.servlet.ServletContext jetspeedContext
           
private static org.apache.commons.logging.Log log
           
protected  org.apache.pluto.om.portlet.PortletDefinition portletDefinition
           
protected  org.apache.jetspeed.factory.PortletFactory portletFactory
           
 
Constructor Summary
LocalPortletInvoker()
           
 
Method Summary
 void action(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
           
 void activate(org.apache.jetspeed.factory.PortletFactory portletFactory, org.apache.pluto.om.portlet.PortletDefinition portletDefinition, javax.servlet.ServletConfig servletConfig)
          Activating an invoker makes it ready to invoke portlets.
 void activate(org.apache.jetspeed.factory.PortletFactory portletFactory, org.apache.pluto.om.portlet.PortletDefinition portletDefinition, javax.servlet.ServletConfig servletConfig, String servletMappingName)
          Activating an invoker makes it ready to invoke portlets.
protected  void invoke(javax.portlet.PortletRequest portletRequest, javax.portlet.PortletResponse portletResponse, Integer method)
          Invokes the specific request denoted by the method parameter on a portlet.
 boolean isActivated()
          Returns true if the state of this invoke is 'activated', and false if it is 'passivated'.
 void load(javax.portlet.PortletRequest request, javax.portlet.RenderResponse response)
           
 void passivate()
          Passivates an invoker, freeing it back to the invoker pool.
 void render(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

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

portletFactory

protected org.apache.jetspeed.factory.PortletFactory portletFactory

jetspeedContext

protected javax.servlet.ServletContext jetspeedContext

jetspeedConfig

protected javax.servlet.ServletConfig jetspeedConfig

portletDefinition

protected org.apache.pluto.om.portlet.PortletDefinition portletDefinition

activated

protected boolean activated
Constructor Detail

LocalPortletInvoker

public LocalPortletInvoker()
Method Detail

activate

public void activate(org.apache.jetspeed.factory.PortletFactory portletFactory,
                     org.apache.pluto.om.portlet.PortletDefinition portletDefinition,
                     javax.servlet.ServletConfig servletConfig)
Description copied from interface: JetspeedPortletInvoker
Activating an invoker makes it ready to invoke portlets. If an invoker's state is not activated, it can not invoke.

Specified by:
activate in interface JetspeedPortletInvoker
Parameters:
portletFactory - The factory to get access to the portlet being invoked.
portletDefinition - The portlet's definition that is being invoked.
servletConfig - The servlet configuration of the portal.

passivate

public void passivate()
Description copied from interface: JetspeedPortletInvoker
Passivates an invoker, freeing it back to the invoker pool. If an invoker's state is passivated, it cannot be used to invoke portlets.

Specified by:
passivate in interface JetspeedPortletInvoker

isActivated

public boolean isActivated()
Description copied from interface: JetspeedPortletInvoker
Returns true if the state of this invoke is 'activated', and false if it is 'passivated'.

Specified by:
isActivated in interface JetspeedPortletInvoker
Returns:
True if the current state of the invoker is 'activated' otherwise false.

action

public void action(javax.portlet.ActionRequest request,
                   javax.portlet.ActionResponse response)
            throws javax.portlet.PortletException,
                   IOException
Specified by:
action in interface org.apache.pluto.invoker.PortletInvoker
Throws:
javax.portlet.PortletException
IOException

render

public void render(javax.portlet.RenderRequest request,
                   javax.portlet.RenderResponse response)
            throws javax.portlet.PortletException,
                   IOException
Specified by:
render in interface org.apache.pluto.invoker.PortletInvoker
Throws:
javax.portlet.PortletException
IOException

load

public void load(javax.portlet.PortletRequest request,
                 javax.portlet.RenderResponse response)
          throws javax.portlet.PortletException
Specified by:
load in interface org.apache.pluto.invoker.PortletInvoker
Throws:
javax.portlet.PortletException

invoke

protected void invoke(javax.portlet.PortletRequest portletRequest,
                      javax.portlet.PortletResponse portletResponse,
                      Integer method)
               throws javax.portlet.PortletException,
                      IOException
Invokes the specific request denoted by the method parameter on a portlet. The portlet is invoked with a direct method call on the portlet. It is not invoked in another web application. This requires manipulation of the current thread's classpath.

Parameters:
portletRequest -
portletResponse -
methodID -
Throws:
javax.portlet.PortletException
IOException

activate

public void activate(org.apache.jetspeed.factory.PortletFactory portletFactory,
                     org.apache.pluto.om.portlet.PortletDefinition portletDefinition,
                     javax.servlet.ServletConfig servletConfig,
                     String servletMappingName)
Description copied from interface: JetspeedPortletInvoker
Activating an invoker makes it ready to invoke portlets. If an invoker's state is not activated, it can not invoke. This second signature allows for activating with an extra property.

Specified by:
activate in interface JetspeedPortletInvoker
Parameters:
portletFactory - The factory to get access to the portlet being invoked.
portletDefinition - The portlet's definition that is being invoked.
servletConfig - The servlet configuration of the portal.
servletMappingName - Implementation specific property


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