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: */package org.apache.geronimo.console.jmsmanager.renderers;
17:
18: import java.io.IOException;
19: import java.util.Hashtable;
20:
21: import javax.portlet.PortletException;
22: import javax.portlet.RenderRequest;
23: import javax.portlet.RenderResponse;
24:
25: import org.apache.commons.logging.Log;
26: import org.apache.commons.logging.LogFactory;
27: import org.apache.geronimo.console.jmsmanager.AbstractJMSManager;
28:
29: public class StatisticsRenderer extends AbstractJMSManager implements
30: PortletRenderer {
31:
32: protected static Log log = LogFactory
33: .getLog(StatisticsRenderer.class);
34:
35: public String render(RenderRequest request, RenderResponse response)
36: throws PortletException, IOException {
37:
38: Hashtable statistics = getStatistics(request, response);
39:
40: request.setAttribute("statistics", statistics);
41:
42: return "/WEB-INF/view/jmsmanager/statistics.jsp";
43: }
44:
45: public static Hashtable getStatistics(RenderRequest renderRequest,
46: RenderResponse renderResponse) throws IOException,
47: PortletException {
48: String description = "My Descrition";
49: String currentDepth = "11";
50: String openInputCount = "1";
51: String openOutputCount = "1";
52: String inhibitGet = "false";
53: String inhibitPut = "false";
54: String sharable = "true";
55: String triggerControl = "false";
56: String maximumDepth = "10000";
57: String maximumMessageLength = "2342344";
58:
59: String destinationName = renderRequest
60: .getParameter("destinationName");
61: if (destinationName == null) {
62: destinationName = "";
63: }
64: Hashtable statsHash = new Hashtable();
65:
66: return statsHash;
67: }
68:
69: }
|