protected void registerAndOrderNamedHeaderResource( String headerName, String headerType, String headerReqFlag, Map headerDynamicConfigurationDefault ) { orderNamedHeaderResource( headerName, headerDynamicConfigurationDefault ); setNamedHeaderResourceProperties( headerName, headerType, headerReqFlag, headerDynamicConfigurationDefault ); }
public void reset() { if (!complete) { resetBuffer(); headElements = null; // TODO: clear other (normal) headers } }
/** * Thread.stop() is deprecated. * This method achieves the same by setting the run varaible "shouldRun" to false and interrupting the Thread, * effectively causing the thread to shutdown correctly. * */ public void endThread() { shouldRun = false; this.interrupt(); }
public void start() { addWorkers(this.minWorkers); this.queue = new FIFOQueue(); jobMonitor = new RenderingJobTimeoutMonitor(1000); jobMonitor.start(); }
protected void initializeMissingHeaderConfigurationEntryDefaults( HashMap namedResourcesDefault, HashMap namedResourcesAddedFragmentsDefault, HashMap headerDynamicConfigurationDefault ) { if ( isDesktop() ) { if ( this.headerConfiguration.get( HeaderResource.HEADER_CONFIG_DOJO ) == null ) { initializeDojoHeaderConfigurationDefaults( null, namedResourcesDefault, namedResourcesAddedFragmentsDefault, headerDynamicConfigurationDefault ); } if ( this.headerConfiguration.get( HeaderResource.HEADER_CONFIG_DESKTOP ) == null ) { initializeDesktopHeaderConfigurationDefaults( null, namedResourcesDefault, namedResourcesAddedFragmentsDefault, headerDynamicConfigurationDefault ); } } }
public WorkerImpl(WorkerMonitor monitor, ThreadGroup tg, String name) { super(tg, name); this.setMonitor(monitor); this.setDaemon(true); }
public void start() { if (this.jobWorksMonitorEnabled) { jobMonitor = new CommonjWorkerRenderingJobTimeoutMonitor(1000); jobMonitor.start(); } }
public void stop() { synchronized (workers) { for (WorkerImpl worker : new ArrayList<WorkerImpl>(workers)) { worker.interrupt(); } } synchronized (workersMonitored) { for (WorkerImpl worker : new ArrayList<WorkerImpl>(workersMonitored)) { worker.interrupt(); } } if (jobMonitor != null) { jobMonitor.endThread(); } jobMonitor = null; }
public boolean exceededTimeout(long renderTime, PortletWindow window) { if (!isEnabled()) { return false; } RenderTrackable trackInfo = (RenderTrackable)window; long defaultTimeout = this.getDefaultPortletTimeout(); if (trackInfo.getExpiration() > 0) { return (renderTime > trackInfo.getExpiration()); } else if (defaultTimeout > 0) { return (renderTime > defaultTimeout); } return false; }
/** * Render the specified Page fragment. Result is returned in the * PortletResponse. */ public void renderNow( ContentFragment fragment, RequestContext requestContext ) { renderNow(fragment, requestContext, false); } /**
public void workCompleted(WorkEvent we) { WorkItem workItem = we.getWorkItem(); if (log.isDebugEnabled()) { log.debug("[CommonjWorkMonitorImpl] workCompleted: " + workItem); } if (this.jobWorksMonitorEnabled) { removeMonitoredJobWork(workItem); } }
RenderingJobTimeoutMonitor(long interval) { super("RenderingJobTimeoutMonitor"); setDaemon(true); if (interval > 0) { this.interval = interval; } } /**
/** * Thread.stop() is deprecated. * This method achieves the same by setting the run varaible "shouldRun" to false and interrupting the Thread, * effectively causing the thread to shutdown correctly. * */ public void endThread() { shouldRun = false; this.interrupt(); }
CommonjWorkerRenderingJobTimeoutMonitor(long interval) { super("CommonjWorkerRenderingJobTimeoutMonitor"); setDaemon(true); if (interval > 0) { this.interval = interval; } } /**
public String getContent() { return toString(); } /**
public void stop() { if (jobMonitor != null) { jobMonitor.endThread(); } jobMonitor = null; }
public HeaderAggregatorImpl( PortletFactory factory, HeaderResourceFactory headerResourceFactory, boolean isDesktop, Map headerConfiguration, Map headerResourceRegistry, DecorationFactory decorationFactory, BasePortalURL baseUrlAccess ) { this.factory = factory; this.headerResourceFactory = headerResourceFactory; this.isDesktop = isDesktop; this.baseUrlAccess = baseUrlAccess; this.decorationFactory = decorationFactory; initializeHeaderConfiguration( headerConfiguration, headerResourceRegistry ); }
public WorkerImpl(WorkerMonitor monitor) { super(); this.setMonitor(monitor); this.setDaemon(true); }
/** * Render the specified Page fragment. Result is returned in the * PortletResponse. */ public void renderNow( ContentFragment fragment, HttpServletRequest request, HttpServletResponse response ) { RequestContext requestContext = (RequestContext) request .getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE); renderNow(fragment, requestContext); }
public void workRejected(WorkEvent we) { WorkItem workItem = we.getWorkItem(); if (log.isDebugEnabled()) { log.debug("[CommonjWorkMonitorImpl] workRejected: " + workItem); } if (this.jobWorksMonitorEnabled) { removeMonitoredJobWork(workItem); } }