ch.qos.logback.core.joran.spi.Interpreter.getEventPlayer()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(8.5k)|赞(0)|评价(0)|浏览(144)

本文整理了Java中ch.qos.logback.core.joran.spi.Interpreter.getEventPlayer()方法的一些代码示例,展示了Interpreter.getEventPlayer()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interpreter.getEventPlayer()方法的具体详情如下:
包路径:ch.qos.logback.core.joran.spi.Interpreter
类名称:Interpreter
方法名:getEventPlayer

Interpreter.getEventPlayer介绍

暂无

代码示例

代码示例来源:origin: org.springframework.boot/spring-boot

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);
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * 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());
}

代码示例来源:origin: camunda/camunda-bpm-platform

public void doConfigure(final List<SaxEvent> eventList)
    throws JoranException {
 buildInterpreter();
 // disallow simultaneous configurations of the same context
 synchronized (context.getConfigurationLock()) {
  interpreter.getEventPlayer().play(eventList);
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

interpreter.getEventPlayer().addEventsDynamically(listToPlay, 1);

代码示例来源:origin: camunda/camunda-bpm-platform

@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);
 }
}

代码示例来源:origin: net.rakugakibox.spring.boot/logback-access-spring-boot-starter

/** {@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();
}

代码示例来源:origin: com.hynnet/logback-core

/**
 * 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());
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core

/**
 * 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());
}

代码示例来源:origin: ch.qos.logback/core

/**
 * 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());
}

代码示例来源:origin: tony19/logback-android

/**
 * 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);
 }
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core

public void doConfigure(final List<SaxEvent> eventList)
    throws JoranException {
 buildInterpreter();
 // disallow simultaneous configurations of the same context
 synchronized (context.getConfigurationLock()) {
  interpreter.getEventPlayer().play(eventList);
 }
}

代码示例来源:origin: ch.qos.logback/core

public void doConfigure(final List<SaxEvent> eventList)
    throws JoranException {
 buildInterpreter();
 // disallow simultaneous configurations of the same context
 synchronized (context.getConfigurationLock()) {
  interpreter.getEventPlayer().play(eventList);
 }
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

public void doConfigure(final List<SaxEvent> eventList) throws JoranException {
  buildInterpreter();
  // disallow simultaneous configurations of the same context
  synchronized (context.getConfigurationLock()) {
    interpreter.getEventPlayer().play(eventList);
  }
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

public void doConfigure(final List<SaxEvent> eventList) throws JoranException {
  buildInterpreter();
  // disallow simultaneous configurations of the same context
  synchronized (context.getConfigurationLock()) {
    interpreter.getEventPlayer().play(eventList);
  }
}

代码示例来源:origin: com.hynnet/logback-core

public void doConfigure(final List<SaxEvent> eventList)
    throws JoranException {
 buildInterpreter();
 // disallow simultaneous configurations of the same context
 synchronized (context.getConfigurationLock()) {
  interpreter.getEventPlayer().play(eventList);
 }
}

代码示例来源:origin: Nextdoor/bender

public void doConfigure(final List<SaxEvent> eventList) throws JoranException {
  buildInterpreter();
  // disallow simultaneous configurations of the same context
  synchronized (context.getConfigurationLock()) {
    interpreter.getEventPlayer().play(eventList);
  }
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

@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);
  }
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core

@Override
public void begin(InterpretationContext ec, String name, Attributes attributes)
    throws ActionException {
 SaxEventRecorder recorder = new SaxEventRecorder();
 this.attributeInUse = null;
 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);
 }
}

代码示例来源:origin: tony19/logback-android

/**
 * Processes an include
 * @param ic context
 * @param url URL to file/resource being included
 */
@Override
protected void processInclude(InterpretationContext ic, URL url) throws JoranException {
 InputStream in = openURL(url);
 try {
  if (in != null) {
   // add URL to watch list in case the "scan" flag is true, in
   // which case this URL is periodically checked for changes
   ConfigurationWatchListUtil.addToWatchList(getContext(), url);
   // parse the include
   SaxEventRecorder recorder = createRecorder(in, url);
   recorder.setContext(getContext());
   recorder.recordEvents(in);
   // remove the leading/trailing tags (<included> or <configuration>)
   trimHeadAndTail(recorder);
   ic.getJoranInterpreter().getEventPlayer().addEventsDynamically(recorder.getSaxEventList(), this.eventOffset);
  }
 } catch (JoranException e) {
  optionalWarning("Failed processing [" + url.toString() + "]", e);
 } finally {
  close(in);
 }
}

代码示例来源:origin: ch.qos.logback/core

@Override
public void begin(InterpretationContext ec, String name, Attributes attributes)
    throws ActionException {
 SaxEventRecorder recorder = new SaxEventRecorder();
 this.attributeInUse = null;
 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);
 }
}

相关文章