/**
*
* Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.geronimo.console.jmsmanager.renderers;
import java.io.IOException;
import java.util.Hashtable;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.geronimo.console.jmsmanager.AbstractJMSManager;
public class StatisticsRenderer extends AbstractJMSManager implements
PortletRenderer {
protected static Log log = LogFactory.getLog(StatisticsRenderer.class);
public String render(RenderRequest request, RenderResponse response)
throws PortletException, IOException {
Hashtable statistics = getStatistics(request, response);
request.setAttribute("statistics", statistics);
return "/WEB-INF/view/jmsmanager/statistics.jsp";
}
public static Hashtable getStatistics(RenderRequest renderRequest,
RenderResponse renderResponse) throws IOException, PortletException {
String description = "My Descrition";
String currentDepth = "11";
String openInputCount = "1";
String openOutputCount = "1";
String inhibitGet = "false";
String inhibitPut = "false";
String sharable = "true";
String triggerControl = "false";
String maximumDepth = "10000";
String maximumMessageLength = "2342344";
String destinationName = renderRequest.getParameter("destinationName");
if (destinationName == null) {
destinationName = "";
}
Hashtable statsHash = new Hashtable();
return statsHash;
}
}