/** The <b>EvaluatorClass</b> option takes a string value representing the name of the class implementing the {@link TriggeringEventEvaluator} interface. A corresponding object will be instantiated and assigned as the triggering event evaluator for the SMTPAppender. */ public void setEvaluatorClass(String value) { evaluator = (TriggeringEventEvaluator) OptionConverter.instantiateByClassName(value, TriggeringEventEvaluator.class, evaluator); }
/** * Sets triggering evaluator. * @param trigger triggering event evaluator. * @since 1.2.15 */ public final void setEvaluator(final TriggeringEventEvaluator trigger) { if (trigger == null) { throw new NullPointerException("trigger"); } this.evaluator = trigger; }
/** {@inheritDoc} */ public boolean parseUnrecognizedElement(final Element element, final Properties props) throws Exception { if ("triggeringPolicy".equals(element.getNodeName())) { Object triggerPolicy = org.apache.log4j.xml.DOMConfigurator.parseElement( element, props, TriggeringEventEvaluator.class); if (triggerPolicy instanceof TriggeringEventEvaluator) { setEvaluator((TriggeringEventEvaluator) triggerPolicy); } return true; } return false; }
/** * Tests that triggeringPolicy element will set evaluator. */ public void testTrigger() { DOMConfigurator.configure("input/xml/smtpAppender1.xml"); SMTPAppender appender = (SMTPAppender) Logger.getRootLogger().getAppender("A1"); TriggeringEventEvaluator evaluator = appender.getEvaluator(); assertTrue(evaluator instanceof MockTriggeringEventEvaluator); }
public boolean parseUnrecognizedElement(final Element element, final Properties props) throws Exception { if ("triggeringPolicy".equals(element.getNodeName())) { Object triggerPolicy = org.apache.log4j.xml.DOMConfigurator.parseElement( element, props, TriggeringEventEvaluator.class); if (triggerPolicy instanceof TriggeringEventEvaluator) { setEvaluator((TriggeringEventEvaluator) triggerPolicy); } return true; } return false; }
@Override public boolean parseUnrecognizedElement(Element element, Properties props) throws Exception { if ("triggeringPolicy".equals(element.getNodeName())) { Object triggerPolicy = org.apache.log4j.xml.DOMConfigurator.parseElement( element, props, TriggeringEventEvaluator.class); if (triggerPolicy instanceof TriggeringEventEvaluator) { setEvaluator((TriggeringEventEvaluator) triggerPolicy); } return true; } return false; }
/** {@inheritDoc} * @since 1.2.15 */ public boolean parseUnrecognizedElement(final Element element, final Properties props) throws Exception { if ("triggeringPolicy".equals(element.getNodeName())) { Object triggerPolicy = org.apache.log4j.xml.DOMConfigurator.parseElement( element, props, TriggeringEventEvaluator.class); if (triggerPolicy instanceof TriggeringEventEvaluator) { setEvaluator((TriggeringEventEvaluator) triggerPolicy); } return true; } return false; }
/** * The <b>EvaluatorClass</b> option takes a string value representing the * name of the class implementing the {@link TriggeringEventEvaluator} * interface. A corresponding object will be instantiated and assigned as * the triggering event evaluator for the SMTPAppender. */ public void setEvaluatorClass(final String value) { evaluator = (TriggeringEventEvaluator) OptionConverter.instantiateByClassName( value, TriggeringEventEvaluator.class, evaluator); }
/** * Sets triggering evaluator. * * @param trigger triggering event evaluator. * * @since 1.2.15 */ public final void setEvaluator(final TriggeringEventEvaluator trigger) { if (trigger == null) { throw new NullPointerException("trigger"); } this.evaluator = trigger; }
/** Use <code>evaluator</code> passed as parameter as the {@link TriggeringEventEvaluator} for this SMTPAppender. */ public SMTPAppender(TriggeringEventEvaluator evaluator) { this.evaluator = evaluator; }
public void setEvaluator(TriggeringEventEvaluator evaluator) { this.evaluator = evaluator; }
public TriggeringEventEvaluator getEvaluator() { return evaluator; }
public IMAppender(final TriggeringEventEvaluator evaluator) { this.evaluator = evaluator; }
/** * Get triggering evaluator. * @return triggering event evaluator. * @since 1.2.15 */ public final TriggeringEventEvaluator getEvaluator() { return evaluator; }
/** * The <b>EvaluatorClass </b> option takes a string value representing the name of the class implementing the {@linkTriggeringEventEvaluator} interface. A * corresponding object will be instantiated and assigned as the triggering event evaluator for the SMTPAppender. */ public void setEvaluatorClass(final String value) { evaluator = (TriggeringEventEvaluator) OptionConverter.instantiateByClassName(value, TriggeringEventEvaluator.class, evaluator); }
/** * Get triggering evaluator. * * @return triggering event evaluator. * * @since 1.2.15 */ public final TriggeringEventEvaluator getEvaluator() { return evaluator; }