private void addEventsToPlayer(InterpretationContext ic) { Interpreter interpreter = ic.getJoranInterpreter(); this.events.remove(0); this.events.remove(this.events.size() - 1); interpreter.getEventPlayer().addEventsDynamically(this.events, 1); }
public Interpreter(Context context, RuleStore rs, ElementPath initialElementPath) { this.cai = new CAI_WithLocatorSupport(context, this); ruleStore = rs; interpretationContext = new InterpretationContext(context, this); implicitActions = new ArrayList<ImplicitAction>(3); this.elementPath = initialElementPath; actionListStack = new Stack<List<Action>>(); eventPlayer = new EventPlayer(this); }
public void doConfigure(final List<SaxEvent> eventList) throws JoranException { buildInterpreter(); // disallow simultaneous configurations of the same context synchronized (context.getConfigurationLock()) { interpreter.getEventPlayer().play(eventList); } }
public void doConfigure(final List<SaxEvent> eventList) throws JoranException { buildInterpreter(); EventPlayer player = new EventPlayer(interpreter); player.play(eventList); } }
/** * Register the current event list in currently in the interpreter as a safe * configuration point. * * @since 0.9.30 */ public void registerSafeConfiguration() { context.putObject(SAFE_JORAN_CONFIGURATION, interpreter.getEventPlayer().getCopyOfPlayerEventList()); }
@Override final public void doConfigure(final List<SaxEvent> eventList) throws JoranException { buildInterpreter(); interpreter.getInterpretationContext().pushObject(ff); EventPlayer player = new EventPlayer(interpreter); player.play(eventList); }
/** * Register the current event list in currently in the interpreter as a safe * configuration point. * * @since 0.9.30 */ public void registerSafeConfiguration() { context.putObject(SAFE_JORAN_CONFIGURATION, interpreter.getEventPlayer().getCopyOfPlayerEventList()); }
interpreter.getEventPlayer().addEventsDynamically(listToPlay, 1);
public Interpreter(Context context, RuleStore rs, ElementPath initialElementPath) { this.cai = new CAI_WithLocatorSupport(context, this); ruleStore = rs; interpretationContext = new InterpretationContext(context, this); implicitActions = new ArrayList<ImplicitAction>(3); this.elementPath = initialElementPath; actionListStack = new Stack<List<Action>>(); eventPlayer = new EventPlayer(this); }
public void play(List<SaxEvent> eventList) { player.play(eventList); }
/** * Register the current event list in currently in the interpreter as a safe * configuration point. * * @since 0.9.30 */ public void registerSafeConfiguration() { context.putObject(SAFE_JORAN_CONFIGURATION, interpreter.getEventPlayer().getCopyOfPlayerEventList()); }
@Override public void begin(InterpretationContext ec, String name, Attributes attributes) throws ActionException { SaxEventRecorder recorder = new SaxEventRecorder(context); this.attributeInUse = null; this.optional = OptionHelper.toBoolean(attributes.getValue(OPTIONAL_ATTR), false); if (!checkAttributes(attributes)) { return; } InputStream in = getInputStream(ec, attributes); try { if (in != null) { parseAndRecord(in, recorder); // remove the <included> tag from the beginning and </included> from the end trimHeadAndTail(recorder); // offset = 2, because we need to get past this element as well as the end element ec.getJoranInterpreter().getEventPlayer().addEventsDynamically(recorder.saxEventList, 2); } } catch (JoranException e) { addError("Error while parsing " + attributeInUse, e); } finally { close(in); } }
public Interpreter(Context context, RuleStore rs, ElementPath initialElementPath) { this.cai = new CAI_WithLocatorSupport(context, this); ruleStore = rs; interpretationContext = new InterpretationContext(context, this); implicitActions = new ArrayList<ImplicitAction>(3); this.elementPath = initialElementPath; actionListStack = new Stack<List<Action>>(); eventPlayer = new EventPlayer(this); }
public void doConfigure(final List<SaxEvent> eventList) throws JoranException { buildInterpreter(); // disallow simultaneous configurations of the same context synchronized (context.getConfigurationLock()) { interpreter.getEventPlayer().play(eventList); } }
/** * Register the current event list in currently in the interpreter as a safe * configuration point. * * @since 0.9.30 */ public void registerSafeConfiguration() { context.putObject(SAFE_JORAN_CONFIGURATION, interpreter.getEventPlayer().getCopyOfPlayerEventList()); }
public void addEventsDynamically(List<SaxEvent> eventList) { if (player != null) { player.addEventsDynamically(eventList); } } }
public Interpreter(Context context, RuleStore rs, ElementPath initialElementPath) { this.cai = new CAI_WithLocatorSupport(context, this); ruleStore = rs; interpretationContext = new InterpretationContext(context, this); implicitActions = new ArrayList<ImplicitAction>(3); this.elementPath = initialElementPath; actionListStack = new Stack<List<Action>>(); eventPlayer = new EventPlayer(this); }
/** * Configures logback with SAX events of configuration XML * * @param eventList list of SAX events * @throws JoranException configuration error occurred */ public void doConfigure(final List<SaxEvent> eventList) throws JoranException { buildInterpreter(); // disallow simultaneous configurations of the same context synchronized (context.getConfigurationLock()) { interpreter.getEventPlayer().play(eventList); } }
/** {@inheritDoc} */ @Override public void end(InterpretationContext ic, String name) throws ActionException { depth--; if (depth != 0) { return; } ic.removeInPlayListener(this); if (accepts) { events.remove(0); events.remove(events.size() - 1); ic.getJoranInterpreter().getEventPlayer().addEventsDynamically(events, 1); } events.clear(); }
public Interpreter(Context context, RuleStore rs, ElementPath initialElementPath) { this.cai = new CAI_WithLocatorSupport(context, this); ruleStore = rs; interpretationContext = new InterpretationContext(context, this); implicitActions = new ArrayList<ImplicitAction>(3); this.elementPath = initialElementPath; actionListStack = new Stack<List<Action>>(); eventPlayer = new EventPlayer(this); }