gpt4 book ai didi

org.hotswap.agent.watch.Watcher类的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 07:07:05 31 4
gpt4 key购买 nike

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

Watcher介绍

暂无

代码示例

代码示例来源:origin: HotswapProjects/HotswapAgent

/**
 * Callback method from ch.qos.logback.core.joran.GenericConfigurator.
 *
 * @param configurator the configurator object
 * @param url          configuration file url
 */
public void initLogback(final Object configurator, final URL url) {
  try {
    final URI uri = url.toURI();
    // skip double registration on reload
    if (registeredURIs.contains(uri))
      return;
    LOGGER.debug("Watching '{}' URL for Logback configuration changes.", url);
    registeredURIs.add(uri);
    watcher.addEventListener(appClassLoader, uri, new WatchEventListener() {
      @Override
      public void onEvent(WatchFileEvent event) {
        if (event.getEventType() != FileEvent.DELETE)
          reload(configurator, url);
      }
    });
  } catch (Exception e) {
    LOGGER.error("Exception initializing logback configurator {} on url {}.", e, configurator, url);
  }
}

代码示例来源:origin: HotswapProjects/HotswapAgent

public static void close(ClassLoader classLoader) {
  Map<String, ClassLoader> registerMap = extraRepositories.remove(classLoader);
  if (registerMap != null) {
    for (ClassLoader loader : registerMap.values()) {
      PluginManager.getInstance().getWatcher().closeClassLoader(loader);
    }
  }
}

代码示例来源:origin: HotswapProjects/HotswapAgent

LOGGER.debug("Watching '{}' URI for Log4j2 configuration changes.", configURI);
registeredURIs.add(configURI);
watcher.addEventListener(appClassLoader, parentUri, new WatchEventListener() {

代码示例来源:origin: HotswapProjects/HotswapAgent

watcher.addEventListener(appClassLoader, uri, new WatchEventListener() {
  @Override
  public void onEvent(WatchFileEvent event) {

代码示例来源:origin: HotswapProjects/HotswapAgent

LOGGER.info("Initialize hotswap on URL {}.", uri);
  listener = new AutoHotswapPathEventListener(this);
  watcher.addEventListener(null, uri, listener);
} catch (URISyntaxException e) {
  LOGGER.error("Unable to watch path '{}' for changes.", e, resource);

代码示例来源:origin: HotswapProjects/HotswapAgent

continue;
} else {
  watcher.addEventListener(appClassLoader, basePackageURL, new WatchEventListener() {
    @Override
    public void onEvent(WatchFileEvent event) {

代码示例来源:origin: HotswapProjects/HotswapAgent

LOGGER.info("Registering archive path '{}'", archivePath);
watcher.addEventListener(appClassLoader, uri, new WatchEventListener() {
  @Override
  public void onEvent(WatchFileEvent event) {

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com