Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.HttpService


                ContextXmlParser parser = new ContextXmlParser(defaultContextXml);
                domainCRS = parser.getClearReferencesStatic();
            }

            List<Boolean> csrs = new ArrayList<Boolean>();
            HttpService httpService = serverConfig.getHttpService();
            DeployCommandParameters params = dc.getCommandParameters(DeployCommandParameters.class);
            String vsIDs = params.virtualservers;
            List<String> vsList = StringUtils.parseStringList(vsIDs, " ,");
            if (httpService != null && vsList != null && !vsList.isEmpty()) {
                for (VirtualServer vsBean : httpService.getVirtualServer()) {
                    if (vsList.contains(vsBean.getId())) {
                        Boolean csr = null;
                        Property prop = vsBean.getProperty("contextXmlDefault");
                        if (prop != null) {
                            File contextXml = new File(serverEnvironment.getInstanceRoot(),
View Full Code Here


            Server serv = instance.getServer();
            ConfigContext cfgCtx = InstanceHangAction.configCtx;
            Config cfg = ServerHelper.getConfigForServer(cfgCtx, serv.getName());
       
            // get http-listeners on this server
            HttpService httpSrv = cfg.getHttpService();
            HttpListener[] listeners = httpSrv.getHttpListener();
            for (HttpListener listener : listeners) {
                if (listener.isEnabled()) {
                    enabledListeners.add(listener);
                    //count++;         
                }
View Full Code Here

                String backURL = inst.getConfigFilePath();
                ConfigContext context = ConfigFactory.
                        createConfigContext(backURL);
                Config rootElement = ServerBeansFactory.getConfigBean(context);

                HttpService httpService = rootElement.getHttpService();
                HttpListener[] httpListeners =
                        httpService.getHttpListener();
                for (int j = 0 ; j < httpListeners.length ; j++) {
                    String aPort = httpListeners[j].getPort();
                    aPort = aPort.trim();
                    sLogger.log(Level.FINE, "port = " + aPort);
                    if (aPort.equals(portString)) {
View Full Code Here

        String virtualServer=null;
        try {
            ConfigContext context = getConfigContext();
            //Domain domain = (Domain)context.getRootConfigBean();
            //HttpService service = getHttpService(domain,instanceName);
            HttpService service = ServerBeansFactory.getHttpServiceBean(context);
            if(service !=null){
                HttpListener[] hlArray = service.getHttpListener();
                //check not needed since there should always be atleast 1 httplistener
                //if you don't find one, use first one.
                HttpListener ls = null;
                if(hlArray != null && hlArray.length > 0){
                    ls=hlArray[0];
View Full Code Here

    /**
    * Get the request-processing element from domain.xml.
    * return null if not found
    */    
    private RequestProcessing getRequestProcessing() {
        HttpService httpServiceBean = this.getHttpService();
        if(httpServiceBean == null) {
            return null;
        }
        return httpServiceBean.getRequestProcessing();
    }
View Full Code Here

        return(getWebServerInfo(cc, config, ref.getVirtualServers(), null, null));
    }
   
    private WebServerInfo getWebServerInfo(ConfigContext cc, Config config,
                            String virtualServers, String targetName, String targetHostName) throws ConfigException {
        HttpService httpService = config.getHttpService();
        VirtualServer[] vServers = null;
        List httpListeners = new ArrayList();
        if (virtualServers==null) {
            vServers = httpService.getVirtualServer();
            if (vServers!=null) {
                for (int i=0;i<vServers.length;i++) {
                    VirtualServer vs = vServers[i];
                    // admin virtual server does not count
                    if (vs.getId().equals(com.sun.enterprise.web.VirtualServer.ADMIN_VS))
                        continue;
                   
                    String httpListenersString = vs.getHttpListeners();
                    if (httpListenersString!=null) {
                        String[] httpListenerIDs = httpListenersString.split(",");
                        if (httpListenerIDs!=null) {
                            for (int j=0;j<httpListenerIDs.length;j++) {
                                httpListeners.add(httpService.getHttpListenerById(httpListenerIDs[j]));
                            }
                        }
                    }
                }
            }
        } else {
            String virtualServerNames[] = virtualServers.split(",");
            if (virtualServerNames!=null) {
                for (int i=0;i<virtualServerNames.length;i++) {
                    VirtualServer vs = httpService.getVirtualServerById(virtualServerNames[i]);
                    String httpListenersString = vs.getHttpListeners();
                    if (httpListenersString!=null) {
                        String[] httpListenerIDs = httpListenersString.split(",");
                        if (httpListenerIDs!=null) {
                            for (int j=0;j<httpListenerIDs.length;j++) {
                                httpListeners.add(httpService.getHttpListenerById(httpListenerIDs[i]));
                            }
                        }
                    }
                }
            }
View Full Code Here

  ConfigContext ctxt = scontext.getConfigContext();
  conf = ServerBeansFactory.getConfigBean( ctxt );
 
  // Start HTTP listener ports
  HttpService httpService = conf.getHttpService();
        int backlog = 0;
        try {
            backlog = Integer.parseInt(
            httpService.getConnectionPool().getMaxPendingCount());
        } catch (Exception e) {
            logger.log(Level.WARNING, e.getMessage());
        }
  HttpListener[] httpListeners = httpService.getHttpListener();
  for ( int i=0; i<httpListeners.length; i++ ) {
      if ( !httpListeners[i].isEnabled() )
    continue;
            startService(httpListeners[i], false, backlog);
      logFine("Started ASSocketService for HTTP(S) ");
View Full Code Here

        ArrayList virtualServerIds = new ArrayList();

        try {
            Config config  = (Config) ConfigBeansFactory.getConfigBeanByXPath(
                getConfigContext(), ServerXPathHelper.XPATH_CONFIG);
            HttpService httpService = config.getHttpService();
            VirtualServer[] virtualServers = httpService.getVirtualServer();
            for (int j = 0; j < virtualServers.length; j++) {
                VirtualServer aServer   = virtualServers[j];
                String defWebModule     = aServer.getDefaultWebModule();
                if ((defWebModule != null) &&
                (defWebModule.equals(webModuleName))) {
View Full Code Here

     *@param securityEnabled whether the listener should be secure or open
     *@return HostAndPort for the first non-admin listener matching the security setting
     */
    private static HostAndPort buildHostAndPortFromConfig(ConfigContext configContext, boolean securityEnabled) throws ConfigException {
        Config config = ServerBeansFactory.getConfigBean(configContext);
        HttpService httpService = config.getHttpService();
        HttpListener [] listeners = httpService.getHttpListener();

        return findNonadminListener(configContext, listeners, securityEnabled);
    }
View Full Code Here

        String serverName = null;
        int port = 0;
        try {
            Domain domain = ConfigAPIHelper.getDomainConfigBean(getConfigContext());
            Config config = domain.getConfigs().getConfig(0);
            HttpService httpService = config.getHttpService();
            HttpListener[] httpListener = httpService.getHttpListener();
            VirtualServer[] virtualServer = httpService.getVirtualServer();
           
            // iterate for each of the config virtual server

            for (VirtualServer v : virtualServer) {
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.HttpService

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.