Package org.apache.geronimo.management.geronimo

Examples of org.apache.geronimo.management.geronimo.WebManager


//    }
//

    public static WebAccessLog getWebAccessLog(PortletRequest request, AbstractName managerName, AbstractName containerName) {
        ManagementHelper helper = getManagementHelper(request);
        WebManager manager = (WebManager) helper.getObject(managerName);
        return manager.getAccessLog((WebContainer) helper.getObject(containerName));
    }
View Full Code Here


        return (WebContainer) helper.getObject(containerName);
    }

    public static WebConnector createWebConnector(PortletRequest request, AbstractName managerName, AbstractName containerName, String name, String protocol, String host, int port) {
        ManagementHelper helper = getManagementHelper(request);
        WebManager manager = (WebManager) helper.getObject(managerName);
        return manager.addConnector((WebContainer) helper.getObject(containerName), name, protocol, host, port);
    }
View Full Code Here

        return manager.addConnector((WebContainer) helper.getObject(containerName), name, protocol, host, port);
    }

    public static WebConnector[] getWebConnectors(PortletRequest request, AbstractName managerName) {
        ManagementHelper helper = getManagementHelper(request);
        WebManager manager = (WebManager) helper.getObject(managerName);
        return (WebConnector[]) manager.getConnectors();
    }
View Full Code Here

        return (WebConnector[]) manager.getConnectors();
    }

    public static WebConnector[] getWebConnectors(PortletRequest request, AbstractName managerName, String protocol) {
        ManagementHelper helper = getManagementHelper(request);
        WebManager manager = (WebManager) helper.getObject(managerName);
        return (WebConnector[]) manager.getConnectors(protocol);
    }
View Full Code Here

        return (WebConnector) helper.getObject(connectorName);
    }

    public static WebConnector[] getWebConnectorsForContainer(PortletRequest request, AbstractName managerName, AbstractName containerName, String protocol) {
        ManagementHelper helper = getManagementHelper(request);
        WebManager manager = (WebManager) helper.getObject(managerName);
        return (WebConnector[]) manager.getConnectorsForContainer(containerName, protocol);
    }
View Full Code Here

    private void doList(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, IOException {
        WebManager[] managers = PortletManager.getWebManagers(renderRequest);
        List all = new ArrayList();
        for (int i = 0; i < managers.length; i++) {
            WebManager manager = managers[i];
            AbstractName webManagerName = PortletManager.getNameFor(renderRequest, manager);

            WebContainer[] containers = (WebContainer[]) manager.getContainers();
            for (int j = 0; j < containers.length; j++) {
                List beans = new ArrayList();
                WebContainer container = containers[j];
                AbstractName containerName = PortletManager.getNameFor(renderRequest, container);
                String id;
                if(containers.length == 1) {
                    id = manager.getProductName();
                } else {
                    id = manager.getProductName() + " (" + containerName.getName().get(NameFactory.J2EE_NAME) + ")";
                }
                ContainerInfo result = new ContainerInfo(id, webManagerName.toString(), containerName.toString());

                WebConnector[] connectors = (WebConnector[]) manager.getConnectorsForContainer(container);
                for (int k = 0; k < connectors.length; k++) {
                    WebConnector connector = connectors[k];
                    ConnectorInfo info = new ConnectorInfo();
                    AbstractName connectorName = PortletManager.getNameFor(renderRequest, connector);
                    info.setConnectorURI(connectorName.toString());
                    info.setDescription(PortletManager.getGBeanDescription(renderRequest, connectorName));
                    info.setDisplayName((String)connectorName.getName().get(NameFactory.J2EE_NAME));
                    info.setState(((GeronimoManagedBean)connector).getState());
                    info.setPort(connector.getPort());
                    try {
                        info.setProtocol(connector.getProtocol());
                    } catch (IllegalStateException e) {
                        info.setProtocol("unknown");
                    }
                    beans.add(info);
                }
                result.setConnectors(beans);
                result.setProtocols(manager.getSupportedProtocols());
                all.add(result);
            }
        }
        renderRequest.setAttribute("containers", all);
        renderRequest.setAttribute("serverPort", new Integer(renderRequest.getServerPort()));
View Full Code Here

    public void processAction(ActionRequest actionRequest,
                              ActionResponse actionResponse) throws PortletException, IOException {
        try {
            WebManager[] managers = PortletManager.getCurrentServer(actionRequest).getWebManagers();
            if (managers != null) {
                WebManager manager = managers[0]//todo: handle multiple
                WebContainer[] containers = (WebContainer[]) manager.getContainers();
                if (containers != null) {
                    WebContainer container = containers[0]//todo: handle multiple
                    String server = getWebServerType(container.getClass());
                    String action = actionRequest.getParameter("stats");
                    if (action != null) {
View Full Code Here

            return;
        }
        try {
            WebManager[] managers = PortletManager.getCurrentServer(renderRequest).getWebManagers();
            if (managers != null) {
                WebManager manager = managers[0]//todo: handle multiple
                WebContainer[] containers = (WebContainer[]) manager.getContainers();
                if (containers != null) {
                    WebContainer container = containers[0]//todo: handle multiple
                    if(container.isStatisticsProvider()) {
                        WebContainerStats webStats = (WebContainerStats) ((StatisticsProvider)container).getStats();
                        if (webStats.isStatsOn()) {
View Full Code Here

    private void doList(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, IOException {
        WebManager[] managers = PortletManager.getWebManagers(renderRequest);
        List all = new ArrayList();
        for (int i = 0; i < managers.length; i++) {
            WebManager manager = managers[i];
            AbstractName webManagerName = PortletManager.getNameFor(renderRequest, manager);

            WebContainer[] containers = (WebContainer[]) manager.getContainers();
            for (int j = 0; j < containers.length; j++) {
                List beans = new ArrayList();
                WebContainer container = containers[j];
                AbstractName containerName = PortletManager.getNameFor(renderRequest, container);
                String id;
                if(containers.length == 1) {
                    id = manager.getProductName();
                } else {
                    id = manager.getProductName() + " (" + containerName.getName().get(NameFactory.J2EE_NAME) + ")";
                }
                ContainerInfo result = new ContainerInfo(id, webManagerName.toString(), containerName.toString());

                WebConnector[] connectors = (WebConnector[]) manager.getConnectorsForContainer(container);
                for (int k = 0; k < connectors.length; k++) {
                    WebConnector connector = connectors[k];
                    ConnectorInfo info = new ConnectorInfo();
                    AbstractName connectorName = PortletManager.getNameFor(renderRequest, connector);
                    info.setConnectorURI(connectorName.toString());
                    info.setDescription(PortletManager.getGBeanDescription(renderRequest, connectorName));
                    info.setDisplayName((String)connectorName.getName().get(NameFactory.J2EE_NAME));
                    info.setState(((GeronimoManagedBean)connector).getState());
                    info.setPort(connector.getPort());
                    try {
                        info.setProtocol(connector.getProtocol());
                    } catch (IllegalStateException e) {
                        info.setProtocol("unknown");
                    }
                    beans.add(info);
                }
                result.setConnectors(beans);
                result.setProtocols(manager.getSupportedProtocols());
                all.add(result);
            }
        }
        renderRequest.setAttribute("containers", all);
View Full Code Here

    public void processAction(ActionRequest actionRequest,
                              ActionResponse actionResponse) throws PortletException, IOException {
        try {
            WebManager[] managers = PortletManager.getCurrentServer(actionRequest).getWebManagers();
            if (managers != null) {
                WebManager manager = managers[0]//todo: handle multiple
                WebContainer[] containers = (WebContainer[]) manager.getContainers();
                if (containers != null) {
                    WebContainer container = containers[0]//todo: handle multiple
                    String server = getWebServerType(container.getClass());
                    String action = actionRequest.getParameter("stats");
                    if (action != null) {
View Full Code Here

TOP

Related Classes of org.apache.geronimo.management.geronimo.WebManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.