Package com.sun.appserv.management.config

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


      if ( ! checkNotOffline( "testAccessLog" ) )
      {
          return;
      }
     
    AccessLogConfig on = proxy().getAccessLogConfig();
    boolean exists = (on != null);
    if (!exists)
    {
      on = proxy().createAccessLogConfig(EMPTY_MAP);
      assert on == proxy().getAccessLogConfig();
    }
    AccessLogConfig rp = proxy().getAccessLogConfig();
    assert rp != null;
    if (!exists) { proxy().removeAccessLogConfig(); }
  }
View Full Code Here


        @HandlerOutput(name="Format", type=String.class)})
       
        public static void getAccessLogSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
  AccessLogConfig al = config.getHTTPServiceConfig().getAccessLogConfig();
       
        String policy="";
        String interval="";
        String suffix="";
        String format="";
        boolean rotation = true;
       
        if (al != null){
             rotation = al.getRotationEnabled();
             policy = al.getRotationPolicy();
             interval = al.getRotationIntervalInMinutes();
             suffix = al.getRotationSuffix();
             format = al.getFormat();
        }else{
            Map defaultMap = AMXUtil.getDomainConfig().getDefaultAttributeValues(AccessLogConfig.J2EE_TYPE);
            policy = (String) defaultMap.get("rotation-policy");
            interval = (String)defaultMap.get("rotation-interval-in-minutes");
            suffix = (String)defaultMap.get("rotation-suffix");
View Full Code Here

       
        public static void saveAccessLogSettings(HandlerContext handlerCtx) {
       
        try{
            ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
            AccessLogConfig al = config.getHTTPServiceConfig().getAccessLogConfig();
            if (al == null){
                al = config.getHTTPServiceConfig().createAccessLogConfig(new HashMap());
            }
            Boolean temp = (Boolean) handlerCtx.getInputValue("Rotation");
            al.setRotationEnabled( (temp == null) ? false : temp);
            al.setRotationPolicy(((String)handlerCtx.getInputValue("Policy")));
            al.setRotationIntervalInMinutes(((String)handlerCtx.getInputValue("Interval")));
            al.setRotationSuffix(((String)handlerCtx.getInputValue("Suffix")));
            al.setFormat(((String)handlerCtx.getInputValue("Format")));
        }catch(Exception ex){
            GuiUtil.handleException(handlerCtx, ex);
        }
    }  
View Full Code Here

TOP

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

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.