01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: void execute();
37:
38: PortletWindow getWindow();
39:
40: PortletContent getPortletContent();
41:
42: void setTimeout(long portletTimeout);
43:
44: long getTimeout();
45:
46: boolean isTimeout();
47:
48: PortletDefinition getPortletDefinition();
49:
50: HttpServletRequest getRequest();
51:
52: HttpServletResponse getResponse();
53:
54: ContentFragment getFragment();
55:
56: RequestContext getRequestContext();
57:
58: int getExpirationCache();
59:
60: ContentDispatcherCtrl getDispatcher();
61:
62: boolean isContentCached();
63:
64: void setWorkerAttribute(String name, Object value);
65:
66: Object getWorkerAttribute(String name);
67:
68: void removeWorkerAttribute(String name);
69: }
|