org.apache.jetspeed.aggregator.impl
Class RenderingJobImpl

java.lang.Object
  extended by org.apache.jetspeed.aggregator.impl.RenderingJobImpl
All Implemented Interfaces:
Runnable, org.apache.jetspeed.aggregator.RenderingJob

public class RenderingJobImpl
extends Object
implements org.apache.jetspeed.aggregator.RenderingJob

The RenderingJob is responsible for storing all necessary objets for asynchronous portlet rendering as well as implementing the rendering logic in its Runnable method.

Version:
$Id: RenderingJobImpl.java 592263 2007-11-06 04:19:20Z woonsan $
Author:
Rapha?l Luta, David Sean Taylor, Woonsan Ko

Field Summary
protected  org.apache.pluto.PortletContainer container
           
protected  boolean contentIsCached
           
protected  org.apache.jetspeed.aggregator.ContentDispatcherCtrl dispatcher
           
protected  int expirationCache
           
protected  org.apache.jetspeed.om.page.ContentFragment fragment
           
protected static org.apache.commons.logging.Log log
          Commons logging
protected  org.apache.jetspeed.aggregator.PortletContent portletContent
           
protected  org.apache.pluto.om.portlet.PortletDefinition portletDefinition
           
protected  org.apache.jetspeed.aggregator.PortletTrackingManager portletTracking
           
protected  org.apache.jetspeed.aggregator.PortletRenderer renderer
           
protected  javax.servlet.http.HttpServletRequest request
           
protected  org.apache.jetspeed.request.RequestContext requestContext
           
protected  javax.servlet.http.HttpServletResponse response
           
protected  long startTimeMillis
           
protected  org.apache.jetspeed.statistics.PortalStatistics statistics
           
protected  long timeout
           
protected  org.apache.pluto.om.window.PortletWindow window
          WorkerMonitor used to flush the queue
protected  Map workerAttributes
           
 
Constructor Summary
RenderingJobImpl(org.apache.pluto.PortletContainer container, org.apache.jetspeed.aggregator.PortletRenderer renderer, org.apache.pluto.om.portlet.PortletDefinition portletDefinition, org.apache.jetspeed.aggregator.PortletContent portletContent, org.apache.jetspeed.om.page.ContentFragment fragment, org.apache.jetspeed.aggregator.ContentDispatcherCtrl dispatcher, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.jetspeed.request.RequestContext requestContext, org.apache.pluto.om.window.PortletWindow window, org.apache.jetspeed.statistics.PortalStatistics statistics, int expirationCache, boolean contentIsCached)
           
RenderingJobImpl(org.apache.pluto.PortletContainer container, org.apache.jetspeed.aggregator.PortletRenderer renderer, org.apache.pluto.om.portlet.PortletDefinition portletDefinition, org.apache.jetspeed.aggregator.PortletContent portletContent, org.apache.jetspeed.om.page.ContentFragment fragment, org.apache.jetspeed.aggregator.ContentDispatcherCtrl dispatcher, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.jetspeed.request.RequestContext requestContext, org.apache.pluto.om.window.PortletWindow window, org.apache.jetspeed.statistics.PortalStatistics statistics, int expirationCache, boolean contentIsCached, Map workerAttrs)
           
 
Method Summary
 void execute()
           execute
 org.apache.jetspeed.aggregator.ContentDispatcherCtrl getDispatcher()
           
 int getExpirationCache()
           
 org.apache.jetspeed.om.page.ContentFragment getFragment()
           
 org.apache.jetspeed.aggregator.PortletContent getPortletContent()
           getPortletContent
 org.apache.pluto.om.portlet.PortletDefinition getPortletDefinition()
           
 javax.servlet.http.HttpServletRequest getRequest()
           
 org.apache.jetspeed.request.RequestContext getRequestContext()
           
 javax.servlet.http.HttpServletResponse getResponse()
           
 long getTimeout()
          Gets portlet timout in milliseconds.
 org.apache.pluto.om.window.PortletWindow getWindow()
           getWindow
 Object getWorkerAttribute(String name)
           
 boolean isContentCached()
           
 boolean isTimeout()
          Checks if the portlet rendering is timeout
 void removeWorkerAttribute(String name)
           
 void run()
          Checks if queue is empty, if not try to empty it by calling the WorkerMonitor.
 void setTimeout(long timeout)
          Sets portlet timout in milliseconds.
 void setWorkerAttribute(String name, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log
Commons logging


window

protected org.apache.pluto.om.window.PortletWindow window
WorkerMonitor used to flush the queue


request

protected javax.servlet.http.HttpServletRequest request

response

protected javax.servlet.http.HttpServletResponse response

container

protected org.apache.pluto.PortletContainer container

renderer

protected org.apache.jetspeed.aggregator.PortletRenderer renderer

fragment

protected org.apache.jetspeed.om.page.ContentFragment fragment

requestContext

protected org.apache.jetspeed.request.RequestContext requestContext

portletTracking

protected org.apache.jetspeed.aggregator.PortletTrackingManager portletTracking

portletDefinition

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

portletContent

protected org.apache.jetspeed.aggregator.PortletContent portletContent

statistics

protected org.apache.jetspeed.statistics.PortalStatistics statistics

dispatcher

protected org.apache.jetspeed.aggregator.ContentDispatcherCtrl dispatcher

contentIsCached

protected boolean contentIsCached

expirationCache

protected int expirationCache

workerAttributes

protected Map workerAttributes

startTimeMillis

protected long startTimeMillis

timeout

protected long timeout
Constructor Detail

RenderingJobImpl

public RenderingJobImpl(org.apache.pluto.PortletContainer container,
                        org.apache.jetspeed.aggregator.PortletRenderer renderer,
                        org.apache.pluto.om.portlet.PortletDefinition portletDefinition,
                        org.apache.jetspeed.aggregator.PortletContent portletContent,
                        org.apache.jetspeed.om.page.ContentFragment fragment,
                        org.apache.jetspeed.aggregator.ContentDispatcherCtrl dispatcher,
                        javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response,
                        org.apache.jetspeed.request.RequestContext requestContext,
                        org.apache.pluto.om.window.PortletWindow window,
                        org.apache.jetspeed.statistics.PortalStatistics statistics,
                        int expirationCache,
                        boolean contentIsCached)

RenderingJobImpl

public RenderingJobImpl(org.apache.pluto.PortletContainer container,
                        org.apache.jetspeed.aggregator.PortletRenderer renderer,
                        org.apache.pluto.om.portlet.PortletDefinition portletDefinition,
                        org.apache.jetspeed.aggregator.PortletContent portletContent,
                        org.apache.jetspeed.om.page.ContentFragment fragment,
                        org.apache.jetspeed.aggregator.ContentDispatcherCtrl dispatcher,
                        javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response,
                        org.apache.jetspeed.request.RequestContext requestContext,
                        org.apache.pluto.om.window.PortletWindow window,
                        org.apache.jetspeed.statistics.PortalStatistics statistics,
                        int expirationCache,
                        boolean contentIsCached,
                        Map workerAttrs)
Method Detail

setTimeout

public void setTimeout(long timeout)
Sets portlet timout in milliseconds.

Specified by:
setTimeout in interface org.apache.jetspeed.aggregator.RenderingJob

getTimeout

public long getTimeout()
Gets portlet timout in milliseconds.

Specified by:
getTimeout in interface org.apache.jetspeed.aggregator.RenderingJob

isTimeout

public boolean isTimeout()
Checks if the portlet rendering is timeout

Specified by:
isTimeout in interface org.apache.jetspeed.aggregator.RenderingJob

run

public void run()
Checks if queue is empty, if not try to empty it by calling the WorkerMonitor. When done, pause until next scheduled scan.

Specified by:
run in interface Runnable

execute

public void execute()

execute

Specified by:
execute in interface org.apache.jetspeed.aggregator.RenderingJob

getWindow

public org.apache.pluto.om.window.PortletWindow getWindow()

getWindow

Specified by:
getWindow in interface org.apache.jetspeed.aggregator.RenderingJob
Returns:
The window this job is in charge of rendering

getPortletContent

public org.apache.jetspeed.aggregator.PortletContent getPortletContent()

getPortletContent

Specified by:
getPortletContent in interface org.apache.jetspeed.aggregator.RenderingJob
Returns:
The portlet content this job is in charge of rendering

getPortletDefinition

public org.apache.pluto.om.portlet.PortletDefinition getPortletDefinition()
Specified by:
getPortletDefinition in interface org.apache.jetspeed.aggregator.RenderingJob

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Specified by:
getRequest in interface org.apache.jetspeed.aggregator.RenderingJob

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Specified by:
getResponse in interface org.apache.jetspeed.aggregator.RenderingJob

getFragment

public org.apache.jetspeed.om.page.ContentFragment getFragment()
Specified by:
getFragment in interface org.apache.jetspeed.aggregator.RenderingJob

getRequestContext

public org.apache.jetspeed.request.RequestContext getRequestContext()
Specified by:
getRequestContext in interface org.apache.jetspeed.aggregator.RenderingJob

getExpirationCache

public int getExpirationCache()
Specified by:
getExpirationCache in interface org.apache.jetspeed.aggregator.RenderingJob

getDispatcher

public org.apache.jetspeed.aggregator.ContentDispatcherCtrl getDispatcher()
Specified by:
getDispatcher in interface org.apache.jetspeed.aggregator.RenderingJob

isContentCached

public boolean isContentCached()
Specified by:
isContentCached in interface org.apache.jetspeed.aggregator.RenderingJob

setWorkerAttribute

public void setWorkerAttribute(String name,
                               Object value)
Specified by:
setWorkerAttribute in interface org.apache.jetspeed.aggregator.RenderingJob

getWorkerAttribute

public Object getWorkerAttribute(String name)
Specified by:
getWorkerAttribute in interface org.apache.jetspeed.aggregator.RenderingJob

removeWorkerAttribute

public void removeWorkerAttribute(String name)
Specified by:
removeWorkerAttribute in interface org.apache.jetspeed.aggregator.RenderingJob


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