View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    * 
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   * 
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.jetspeed.aggregator;
18  
19  import javax.servlet.http.HttpServletRequest;
20  import javax.servlet.http.HttpServletResponse;
21  
22  import org.apache.jetspeed.om.page.ContentFragment;
23  import org.apache.jetspeed.request.RequestContext;
24  import org.apache.pluto.om.portlet.PortletDefinition;
25  import org.apache.pluto.om.window.PortletWindow;
26  
27  /***
28   * Worker thread processes jobs and notify its WorkerMonitor when completed.
29   * When no work is available, the worker simply sets itself in a waiting mode
30   * pending reactivation by the WorkerMonitor
31   *
32   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
33   * @version $Id: $
34   */
35  public interface RenderingJob extends Runnable
36  {
37      void execute();
38      
39      PortletWindow getWindow(); 
40  
41      PortletContent getPortletContent();
42  
43      void setTimeout(long portletTimeout);
44  
45      long getTimeout();
46  
47      boolean isTimeout();
48      
49      PortletDefinition getPortletDefinition();
50  
51      HttpServletRequest getRequest();
52  
53      HttpServletResponse getResponse();
54  
55      ContentFragment getFragment();
56  
57      RequestContext getRequestContext();
58  
59      int getExpirationCache();
60  
61      ContentDispatcherCtrl getDispatcher();
62  
63      boolean isContentCached();
64      
65      void setWorkerAttribute(String name, Object value);
66      
67      Object getWorkerAttribute(String name);
68      
69      void removeWorkerAttribute(String name);
70  }
71