Package com.sun.appserv.management.config

Examples of com.sun.appserv.management.config.HTTPListenerConfig


   
    final Map<String,HTTPListenerConfig> proxies  = httpService.getHTTPListenerConfigMap();
   
    for( final String listenerName : proxies.keySet() )
    {
      final HTTPListenerConfig  listener  = (HTTPListenerConfig)
        proxies.get( listenerName );
       
      listener.getEnabled();
    }
  }
View Full Code Here


    final Map<String,String>  allOptions  = MapUtil.newMap( options, optional );
      assert( ! MapUtil.isAllStrings( allOptions ) );
   
    final  int  port  = 31000 + (name.hashCode() % 31000);
   
      final HTTPListenerConfig  config  =
        getHTTPService().createHTTPListenerConfig(name,
          ADDRESS, port, DEF_VIRTUAL_SERVER, SERVER_NAME, allOptions );
     
      return( config );
  }
View Full Code Here

    final String  NAME  = "HTTPListenerConfigMgr-listener-for-testCreateSSL";
   
    try
    {
      removeEx( NAME );
      final HTTPListenerConfig  newListener  =
        (HTTPListenerConfig)createProgeny( NAME, null );
      assert newListener != null;
     
      // verify that the new listener is present
      final Map<String,HTTPListenerConfig>  listeners  =
          getHTTPService().getHTTPListenerConfigMap();
      final HTTPListenerConfig listener = listeners.getNAME  );
      assert listener != null;
      assert listener == newListener;
     
      final String  CERT_NICKNAME  = NAME + "Cert";
     
      final SSLConfig ssl = listener.createSSLConfig( CERT_NICKNAME, options);
      assert ssl != null;
      assert ssl.getCertNickname().equals( CERT_NICKNAME );
     
      listener.removeSSLConfig();
    }
    finally
    {
      remove( NAME );
    }
View Full Code Here

            return null;
        ConfigConfig config = getConfig(configName);
        HTTPServiceConfig service = (config == null) ? null : config.getHTTPServiceConfig();
        if (service != null){
            Map<String,HTTPListenerConfig> listeners = service.getHTTPListenerConfigMap();
            HTTPListenerConfig listener =  listeners.get(listenerName);
            return listener;
        }
        return null;
    }
View Full Code Here

                    sslContainerConfig = (SSLConfigContainer)jmxConfig;
                }else if(type.equals("iiop")){
                    IIOPListenerConfig iiopConfig = config.getIIOPServiceConfig().getIIOPListenerConfigMap().get(oName);
                    sslContainerConfig = (SSLConfigContainer)iiopConfig;
                }else if(type.equals("http")){
                    HTTPListenerConfig httpConfig = config.getHTTPServiceConfig().getHTTPListenerConfigMap().get(oName);
                    sslContainerConfig = (SSLConfigContainer)httpConfig;
                }else if(type.equals("nodeagent")){
                    NodeAgentConfig agentConfig = AMXUtil.getDomainConfig().getNodeAgentConfigMap().get(oName);
                    JMXConnectorConfig jmxConfig = agentConfig.getJMXConnectorConfig();
                    sslContainerConfig = (SSLConfigContainer)jmxConfig;
View Full Code Here

                        sslContainerConfig = (SSLConfigContainer)jmxConfig;
                    }else if(type.equals("iiop")){
                        IIOPListenerConfig iiopConfig = config.getIIOPServiceConfig().getIIOPListenerConfigMap().get(oName);
                        sslContainerConfig = (SSLConfigContainer)iiopConfig;
                    }else if(type.equals("http")){
                        HTTPListenerConfig httpConfig = config.getHTTPServiceConfig().getHTTPListenerConfigMap().get(oName);
                        sslContainerConfig = (SSLConfigContainer)httpConfig;
                    }else if(type.equals("nodeagent")){
                        NodeAgentConfig agentConfig = AMXUtil.getDomainConfig().getNodeAgentConfigMap().get(oName);
                        JMXConnectorConfig jmxConfig = agentConfig.getJMXConnectorConfig();
                        sslContainerConfig = (SSLConfigContainer)jmxConfig;
                    }
                    if((sslContainerConfig != null) && (sslContainerConfig.getSSLConfig() != null)){
                        sslContainerConfig.removeSSLConfig();
                    }
                }else{
                    if(type.equals("iiop")){
                        Map props = (Map) handlerCtx.getFacesContext().getExternalContext().getSessionMap().get("iiopProps");
                        Map options = AMXUtil.convertToPropertiesOptionMap((Map)props.get("options"), null);
                        IIOPListenerConfig iiopConfig = config.getIIOPServiceConfig().createIIOPListenerConfig(
                                (String) props.get("iiopName"),
                                (String) props.get("address"),
                                options);
                        iiopConfig.setPort((String) props.get("port"));
                        iiopConfig.setEnabled((Boolean)props.get("listener"));
                        iiopConfig.setSecurityEnabled((Boolean)props.get("security"));
                        sslContainerConfig = (SSLConfigContainer)iiopConfig;
                    }else if(type.equals("http")){
                        Map props = (Map) handlerCtx.getFacesContext().getExternalContext().getSessionMap().get("httpProps");
                        Map options = AMXUtil.convertToPropertiesOptionMap((Map)props.get("options"), null);
                        int port = Integer.parseInt((String)props.get("port"));
                        String vs = (String) props.get("virtualServer");
                        String httpName = (String) props.get("httpName");
                        String serverName = (String)props.get("serverName");
                        //issue 3714. we need to pass in a String with a space, instead of empty string so backend will take it.
                        //server-name is allowed to be empty. see admin-core/admin/dtds/admin-mbeans-descriptors.xml
                        if (GuiUtil.isEmpty(serverName))serverName = " ";
                       
                        HTTPListenerConfig httpConfig = config.getHTTPServiceConfig().createHTTPListenerConfig(
                                httpName,
                                (String) props.get("address"),
                                port,
                                vs,
                                serverName,
                                options);
                        httpConfig.setEnabled((Boolean)props.get("enabled"));
                        httpConfig.setSecurityEnabled((Boolean)props.get("securityEnabled"));
                        httpConfig.setRedirectPort((String)props.get("redirectPort"));
                        httpConfig.setAcceptorThreads((String)props.get("acceptor-threads"));
                        httpConfig.setXpoweredBy((Boolean)props.get("xpowered-by"));
                        httpConfig.setBlockingEnabled((Boolean)props.get("blocking-enabled"));
                        VirtualServerConfig vsConfig= config.getHTTPServiceConfig().getVirtualServerConfigMap().get(vs);
                        String listeners = vsConfig.getHTTPListeners();
                        if (GuiUtil.isEmpty(listeners))
                            vsConfig.setHTTPListeners(httpName);
                        else
View Full Code Here

                        String listPort = listConfig.getPort();
                        oneRow.put("enabled", enabled);
                        oneRow.put("ntwkAddress", (ntwkAddress == null) ? " ": ntwkAddress);
                        oneRow.put("listPort", (listPort == null) ? " ": listPort);
                    }else if(isHTTP){
                        HTTPListenerConfig httpConfig = (HTTPListenerConfig)configE;
                        boolean enabled = httpConfig.getEnabled();
                        String ntwkAddress = httpConfig.getAddress();
                        String listPort = httpConfig.getPort();
                        String virtualServer = httpConfig.getDefaultVirtualServer();
                        oneRow.put("enabled", enabled);
                        oneRow.put("ntwkAddress", (ntwkAddress == null) ? " ": ntwkAddress);
                        oneRow.put("listPort", (listPort == null) ? " ": listPort);
                        oneRow.put("defVirtualServer", (virtualServer == null) ? " ": virtualServer);
                    }  
View Full Code Here

                return;
            }
            String configName = (String) handlerCtx.getInputValue("ConfigName");
            String httpListenerName = (String) handlerCtx.getInputValue("HttpName");
            ConfigConfig config = AMXUtil.getConfig(configName);
            HTTPListenerConfig httpListConfig = config.getHTTPServiceConfig().getHTTPListenerConfigMap().get(httpListenerName);
            handlerCtx.setOutputValue("Listener", httpListConfig.getEnabled());
            handlerCtx.setOutputValue("security", httpListConfig.getSecurityEnabled());
            handlerCtx.setOutputValue("NetwkAddr", httpListConfig.getAddress());
            handlerCtx.setOutputValue("ListenerPort", httpListConfig.getPort());
            handlerCtx.setOutputValue("DefaultVirtServer", httpListConfig.getDefaultVirtualServer());
            handlerCtx.setOutputValue("ServerName", httpListConfig.getServerName());
            handlerCtx.setOutputValue("RedirectPort", httpListConfig.getRedirectPort());
            handlerCtx.setOutputValue("Acceptor", httpListConfig.getAcceptorThreads());
            handlerCtx.setOutputValue("PoweredBy", httpListConfig.getXpoweredBy());
            handlerCtx.setOutputValue("Blocking", httpListConfig.getBlockingEnabled());
            Map<String, String> pMap = httpListConfig.getProperties();
           
            //refer to issue#2920; If we want to hide this property, just uncomment the following 2 lines.
            //if (httpListenerName.equals(ADMIN_LISTENER))
            //    pMap.remove(PROXIED_PROTOCOLS);
           
View Full Code Here

                httpPropsMap.put("blocking-enabled", (Boolean)handlerCtx.getInputValue("Blocking"));
                handlerCtx.getFacesContext().getExternalContext().getSessionMap().put("httpProps", httpPropsMap);
                handlerCtx.setOutputValue("HttpProps", httpPropsMap);
                //the actual creation is in step 2 of the wizard.
            } else {
                HTTPListenerConfig httpListConfig = config.getHTTPServiceConfig().getHTTPListenerConfigMap().get(httpListenerName);
                String previousVSName = httpListConfig.getDefaultVirtualServer();
                httpListConfig.setAddress(address);
                httpListConfig.setPort((String)handlerCtx.getInputValue("ListenerPort"));
                httpListConfig.setDefaultVirtualServer(virtualServer);
                httpListConfig.setServerName(serverName);
                httpListConfig.setEnabled((Boolean)handlerCtx.getInputValue("Listener"));
                httpListConfig.setSecurityEnabled((Boolean)handlerCtx.getInputValue("security"));
                httpListConfig.setRedirectPort((String)handlerCtx.getInputValue("RedirectPort"));
                httpListConfig.setAcceptorThreads((String)handlerCtx.getInputValue("Acceptor"));
                httpListConfig.setXpoweredBy((Boolean)handlerCtx.getInputValue("PoweredBy"));
                httpListConfig.setBlockingEnabled((Boolean)handlerCtx.getInputValue("Blocking"));
                AMXUtil.editProperties(handlerCtx, httpListConfig);
               
                //refer to issue #2920
                if (httpListenerName.equals(ADMIN_LISTENER)){
                    if (httpListConfig.getSecurityEnabled()){
                        if (httpListConfig.existsProperty(PROXIED_PROTOCOLS))
                            httpListConfig.setPropertyValue(PROXIED_PROTOCOLS, PROXIED_PROTOCOLS_VALUE);
                         else
                             httpListConfig.createProperty(PROXIED_PROTOCOLS, PROXIED_PROTOCOLS_VALUE);
                    }else{
                        if (httpListConfig.existsProperty(PROXIED_PROTOCOLS))
                            httpListConfig.removeProperty(PROXIED_PROTOCOLS);
                    }
                }
               
                //Also need to change the http-listeners attributes of Virtual Server.
                Map<String,VirtualServerConfig>vservers = config.getHTTPServiceConfig().getVirtualServerConfigMap();
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.config.HTTPListenerConfig

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.