Package com.sun.appserv.management.config

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


        @HandlerOutput(name="RotationTimeLimit", type=String.class),
        @HandlerOutput(name="RetainErrorStats", type=String.class)})
        public static void getLogGeneralSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        LogServiceConfig lc = config.getLogServiceConfig();
        String logFile = lc.getFile();
        boolean alarms = lc.getAlarms();
        boolean systemLog = lc.getUseSystemLogging();       
        String logHandler = lc.getLogHandler();
        String logFilter = lc.getLogFilter();
        String rotationLimit = lc.getLogRotationLimitInBytes();
        String rotationTimeLimit = lc.getLogRotationTimeLimitInMinutes();
        String retainErrorStats = lc.getRetainErrorStatisticsForHours();       
        handlerCtx.setOutputValue("LogFile", logFile);
        handlerCtx.setOutputValue("Alarms", alarms);
        handlerCtx.setOutputValue("SystemLog", systemLog);
        handlerCtx.setOutputValue("LogHandler", logHandler);
        handlerCtx.setOutputValue("LogFilter", logFilter);
View Full Code Here


        @HandlerInput(name="AddProps", type=Map.class),
        @HandlerInput(name="RemoveProps", type=ArrayList.class)})
        public static void saveServerLogGeneralSettings(HandlerContext handlerCtx) {
            ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
            try{
                LogServiceConfig lc = config.getLogServiceConfig();
                ArrayList removeProps = (ArrayList)handlerCtx.getInputValue("RemoveProps");
                Map addProps = (Map)handlerCtx.getInputValue("AddProps");
                String[] remove = (String[])removeProps.toArray(new String[ removeProps.size()]);
                for(int i=0; i<remove.length; i++){
                    lc.removeProperty(remove[i]);
                }
                if(addProps != null ){
                    Iterator additer = addProps.keySet().iterator();
                    while(additer.hasNext()){
                        Object key = additer.next();
                        String addvalue = (String)addProps.get(key);
                        lc.setPropertyValue((String)key, addvalue);

                    }
                }        
                lc.setFile((String)handlerCtx.getInputValue("LogFile"));
                lc.setAlarms(((Boolean)handlerCtx.getInputValue("Alarms")).booleanValue());
                lc.setUseSystemLogging(((Boolean)handlerCtx.getInputValue("SystemLog")).booleanValue());
                lc.setLogHandler((String)handlerCtx.getInputValue("LogHandler"));
                lc.setLogFilter((String)handlerCtx.getInputValue("LogFilter"));
                lc.setLogRotationLimitInBytes((String)handlerCtx.getInputValue("RotationLimit"));
                lc.setLogRotationTimeLimitInMinutes((String)handlerCtx.getInputValue("RotationTimeLimit"));
                lc.setRetainErrorStatisticsForHours((String)handlerCtx.getInputValue("RetainErrorStats"))
            }catch(Exception ex){
                GuiUtil.handleException(handlerCtx, ex);
            }
    }
View Full Code Here

        @HandlerInput(name="ConfigName", type=String.class, required=true)},
    output={
        @HandlerOutput(name="Properties", type=Map.class)})
        public static void getLoggingProperties(HandlerContext handlerCtx) {
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        LogServiceConfig lc = config.getLogServiceConfig();
        Map<String, String> props = config.getLogServiceConfig().getProperties();
        handlerCtx.setOutputValue("Properties", props);
       
   
View Full Code Here

        public static void getNodeAgentLoggerSettings(HandlerContext handlerCtx) {
        String ndAgentName = (String) handlerCtx.getInputValue("NodeAgentName");
        Map <String, NodeAgentConfig> nodeAgentMap = AMXUtil.getDomainConfig().getNodeAgentConfigMap();
        NodeAgentConfig agentConfig = nodeAgentMap.get(ndAgentName);
       
        LogServiceConfig lc = agentConfig.getContainee(LogServiceConfig.J2EE_TYPE);
        String logFile = lc.getFile();
        boolean alarms = lc.getAlarms();
        boolean systemLog = lc.getUseSystemLogging();       
        String logHandler = lc.getLogHandler();
        String logFilter = lc.getLogFilter();
        String rotationLimit = lc.getLogRotationLimitInBytes();
        String rotationTimeLimit = lc.getLogRotationTimeLimitInMinutes();
        String retainErrorStats = lc.getRetainErrorStatisticsForHours();
        Map<String, String> props = lc.getProperties();
        handlerCtx.setOutputValue("LogFile", logFile);
        handlerCtx.setOutputValue("Alarms", alarms);
        handlerCtx.setOutputValue("SystemLog", systemLog);
        handlerCtx.setOutputValue("LogHandler", logHandler);
        handlerCtx.setOutputValue("LogFilter", logFilter);
View Full Code Here

        @HandlerInput(name="RemoveProps",       type=ArrayList.class)})
        public static void saveNodeAgentLoggerSettings(HandlerContext handlerCtx) {
        String ndAgentName = (String) handlerCtx.getInputValue("NodeAgentName");
        Map <String, NodeAgentConfig> nodeAgentMap = AMXUtil.getDomainConfig().getNodeAgentConfigMap();
        NodeAgentConfig agentConfig = nodeAgentMap.get(ndAgentName);
        LogServiceConfig lc = agentConfig.getContainee(LogServiceConfig.J2EE_TYPE);
        try{
        AMXUtil.editProperties(handlerCtx, lc);        
        lc.setFile((String)handlerCtx.getInputValue("LogFile"));
        lc.setAlarms(((Boolean)handlerCtx.getInputValue("Alarms")).booleanValue());
        lc.setUseSystemLogging(((Boolean)handlerCtx.getInputValue("SystemLog")).booleanValue());
        lc.setLogHandler((String)handlerCtx.getInputValue("LogHandler"));
        lc.setLogFilter((String)handlerCtx.getInputValue("LogFilter"));
        lc.setLogRotationLimitInBytes((String)handlerCtx.getInputValue("RotationLimit"));
        lc.setLogRotationTimeLimitInMinutes((String)handlerCtx.getInputValue("RotationTimeLimit"));
        lc.setRetainErrorStatisticsForHours((String)handlerCtx.getInputValue("RetainErrorStats"))
        }catch (Exception ex){
            GuiUtil.handleException(handlerCtx, ex);
        }
    }
View Full Code Here

TOP

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

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.