Package org.apache.log4j.spi

Examples of org.apache.log4j.spi.OptionHandler


    throws MBeanException,
    ReflectionException {

    if(operationName.equals("activateOptions") &&
                     layout instanceof OptionHandler) {
      OptionHandler oh = (OptionHandler) layout;
      oh.activateOptions();
      return "Options activated.";
    }
    return null;
  }
View Full Code Here


    throws MBeanException,
    ReflectionException {

    if(operationName.equals("activateOptions") &&
                     appender instanceof OptionHandler) {
      OptionHandler oh = (OptionHandler) appender;
      oh.activateOptions();
      return "Options activated.";
    } else if (operationName.equals("setLayout")) {
      Layout layout = (Layout) OptionConverter.instantiateByClassName((String)
                      params[0],
                      Layout.class,
View Full Code Here

    throws MBeanException,
    ReflectionException {

    if(operationName.equals("activateOptions") &&
                     appender instanceof OptionHandler) {
      OptionHandler oh = (OptionHandler) appender;
      oh.activateOptions();
      return "Options activated.";
    } else if (operationName.equals("setLayout")) {
      Layout layout = (Layout) OptionConverter.instantiateByClassName((String)
                      params[0],
                      Layout.class,
View Full Code Here

    throws MBeanException,
    ReflectionException {

    if(operationName.equals("activateOptions") &&
                     layout instanceof OptionHandler) {
      OptionHandler oh = (OptionHandler) layout;
      oh.activateOptions();
      return "Options activated.";
    }
    return null;
  }
View Full Code Here

    throws MBeanException,
    ReflectionException {

    if(operationName.equals("activateOptions") &&
                     appender instanceof OptionHandler) {
      OptionHandler oh = (OptionHandler) appender;
      oh.activateOptions();
      return "Options activated.";
    } else if (operationName.equals("setLayout")) {
      Layout layout = (Layout) OptionConverter.instantiateByClassName((String)
                      params[0],
                      Layout.class,
View Full Code Here

        //     (for example, triggeringPolicy of org.apache.log4j.rolling.RollingFileAppender)
        PropertyDescriptor prop = getPropertyDescriptor(Introspector.decapitalize(key));
        if (prop != null
                && OptionHandler.class.isAssignableFrom(prop.getPropertyType())
                && prop.getWriteMethod() != null) {
            OptionHandler opt = (OptionHandler)
                    OptionConverter.instantiateByKey(properties, prefix + key,
                                  prop.getPropertyType(),
                                  null);
            PropertySetter setter = new PropertySetter(opt);
            setter.setProperties(properties, prefix + key + ".");
View Full Code Here

    throws MBeanException,
    ReflectionException {

    if(operationName.equals("activateOptions") &&
                     layout instanceof OptionHandler) {
      OptionHandler oh = (OptionHandler) layout;
      oh.activateOptions();
      return "Options activated.";
    }
    return null;
  }
View Full Code Here

          if (((!"layout".equals(str1)) && (!"errorhandler".equals(str1))) || (!(this.obj instanceof Appender)))
          {
            PropertyDescriptor localPropertyDescriptor = getPropertyDescriptor(Introspector.decapitalize(str1));
            if ((localPropertyDescriptor != null) && (OptionHandler.class.isAssignableFrom(localPropertyDescriptor.getPropertyType())) && (localPropertyDescriptor.getWriteMethod() != null))
            {
              OptionHandler localOptionHandler = (OptionHandler)OptionConverter.instantiateByKey(paramProperties, paramString + str1, localPropertyDescriptor.getPropertyType(), null);
              PropertySetter localPropertySetter = new PropertySetter(localOptionHandler);
              localPropertySetter.setProperties(paramProperties, paramString + str1 + ".");
              try
              {
                localPropertyDescriptor.getWriteMethod().invoke(this.obj, new Object[] { localOptionHandler });
View Full Code Here

TOP

Related Classes of org.apache.log4j.spi.OptionHandler

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.