Package com.sun.appserv.management.config

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


      if ( ! checkNotOffline( "testHTTPFileCache" ) )
      {
          return;
      }
     
    HTTPFileCacheConfig on = proxy().getHTTPFileCacheConfig();
    boolean exists = (on != null);
    if (!exists)
    {
      on = proxy().createHTTPFileCacheConfig(EMPTY_MAP);
      assert on == proxy().getHTTPFileCacheConfig();
    }
    HTTPFileCacheConfig rp = proxy().getHTTPFileCacheConfig();
    assert rp != null;
    if (!exists) { proxy().removeHTTPFileCacheConfig(); }
  }
View Full Code Here


        @HandlerOutput(name="FileCaching",  type=String.class)})
       
        public static void getHttpFileCachingSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
  HTTPFileCacheConfig hp = config.getHTTPServiceConfig().getHTTPFileCacheConfig();
        boolean globally = hp.getGloballyEnabled();
        boolean fileTransmission = hp.getFileTransmissionEnabled();
        String age = hp.getMaxAgeInSeconds();
        String fileCount = hp.getMaxFilesCount();
        String hashSize = hp.getHashInitSize();
        String medLimit = hp.getMediumFileSizeLimitInBytes();
        String medSize = hp.getMediumFileSpaceInBytes();
        String smLimit = hp.getSmallFileSizeLimitInBytes();
        String smSize = hp.getSmallFileSpaceInBytes();
        boolean fileCaching = hp.getFileCachingEnabled();
       if(fileCaching == true) {
            handlerCtx.setOutputValue("FileCaching", "ON");   
        } else {
            handlerCtx.setOutputValue("FileCaching", "OFF");
        }             
View Full Code Here

        @HandlerOutput(name="FileCaching",  type=String.class)})
       
        public static void getHttpFileCachingDefaultSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
  HTTPFileCacheConfig hp = config.getHTTPServiceConfig().getHTTPFileCacheConfig();
        String globally = hp.getDefaultValue(HTTPFileCacheConfigKeys.GLOBALLY_ENABLED_KEY);
        String fileTransmission = hp.getDefaultValue(HTTPFileCacheConfigKeys.FILE_TRANSMISSION_ENABLED_KEY);
        String age = hp.getDefaultValue(HTTPFileCacheConfigKeys.MAX_AGE_IN_SECONDS_KEY);
        String fileCount = hp.getDefaultValue(HTTPFileCacheConfigKeys.MAX_FILES_COUNT_KEY);
        String hashSize = hp.getDefaultValue(HTTPFileCacheConfigKeys.HASH_INIT_SIZE_KEY);
        String medLimit = hp.getDefaultValue(HTTPFileCacheConfigKeys.MEDIUM_FILE_SIZE_LIMIT_IN_BYTES_KEY);
        String medSize = hp.getDefaultValue(HTTPFileCacheConfigKeys.MEDIUM_FILE_SPACE_IN_BYTES_KEY);
        String smLimit = hp.getDefaultValue(HTTPFileCacheConfigKeys.SMALL_FILE_SIZE_LIMIT_IN_BYTES_KEY);
        String smSize = hp.getDefaultValue(HTTPFileCacheConfigKeys.SMALL_FILE_SPACE_IN_BYTES_KEY);
        String fileCaching = hp.getDefaultValue(HTTPFileCacheConfigKeys.FILE_CACHING_ENABLED_KEY);
        if(globally.equals("true")) {
            handlerCtx.setOutputValue("Globally", true);   
        } else {
            handlerCtx.setOutputValue("Globally", false);
        }  
View Full Code Here

       
        public static void saveHttpFileCachingSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        try{
            HTTPFileCacheConfig hp = config.getHTTPServiceConfig().getHTTPFileCacheConfig();
            hp.setGloballyEnabled(((Boolean)handlerCtx.getInputValue("Globally")).booleanValue());
            hp.setFileTransmissionEnabled(((Boolean)handlerCtx.getInputValue("FileTransmission")).booleanValue());
            hp.setMaxAgeInSeconds(((String)handlerCtx.getInputValue("Age")));
            hp.setMaxFilesCount(((String)handlerCtx.getInputValue("FileCount")));
            hp.setHashInitSize(((String)handlerCtx.getInputValue("HashSize")));
            hp.setMediumFileSizeLimitInBytes(((String)handlerCtx.getInputValue("MedLimit")));
            hp.setMediumFileSpaceInBytes(((String)handlerCtx.getInputValue("MedSize")));
            hp.setSmallFileSizeLimitInBytes(((String)handlerCtx.getInputValue("SmLimit")));
            hp.setSmallFileSpaceInBytes(((String)handlerCtx.getInputValue("SmSize")));
            String fileCaching = (String)handlerCtx.getInputValue("FileCaching");
            if(fileCaching.equals("ON")) {
                hp.setFileCachingEnabled(true);   
            } else {
                hp.setFileCachingEnabled(false);  
            }            
        }catch(Exception ex){
            GuiUtil.handleException(handlerCtx, ex);
        }
       
View Full Code Here

TOP

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

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.