org.identityconnectors.common.logging.Log.warn()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(9.5k)|赞(0)|评价(0)|浏览(103)

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

Log.warn介绍

暂无

代码示例

代码示例来源:origin: net.tirasa.connid/connector-framework-internal

public static void dispose(final ConnectorPoolKey connectorPoolKey) {
  synchronized (POOLS) {
    ObjectPool<PoolableConnector> pool = POOLS.remove(connectorPoolKey);
    if (null != pool) {
      try {
        pool.shutdown();
      } catch (Exception e) {
        LOG.warn(e, "Failed to close pool: {0}", pool);
      }
    }
  }
}

代码示例来源:origin: Tirasa/ConnId

public static void dispose(final ConnectorPoolKey connectorPoolKey) {
  synchronized (POOLS) {
    ObjectPool<PoolableConnector> pool = POOLS.remove(connectorPoolKey);
    if (null != pool) {
      try {
        pool.shutdown();
      } catch (Exception e) {
        LOG.warn(e, "Failed to close pool: {0}", pool);
      }
    }
  }
}

代码示例来源:origin: org.connid/connid-framework-internal

/**
   * Dispose of an object, but don't throw any exceptions
   *
   * @param object
   */
  private void disposeNoException(final T object) {
    try {
      _handler.disposeObject(object);
    } catch (Exception e) {
      LOG.warn(e, "disposeObject() is not supposed to throw");
    }
  }
}

代码示例来源:origin: org.connid/connid-framework-internal

public static void dispose() {
    synchronized (POOLS) {
      // close each pool..
      for (ObjectPool<PoolableConnector> pool : POOLS.values()) {
        try {
          pool.shutdown();
        } catch (Exception e) {
          LOG.warn(e, "Failed to close pool: {0}", pool);
        }
      }
      // clear the map of all _pools..
      POOLS.clear();
    }
  }
}

代码示例来源:origin: net.tirasa.connid/connector-framework-internal

public static void dispose() {
    synchronized (POOLS) {
      // close each pool..
      POOLS.values().forEach(pool -> {
        try {
          pool.shutdown();
        } catch (Exception e) {
          LOG.warn(e, "Failed to close pool: {0}", pool);
        }
      });
      // clear the map of all POOLS..
      POOLS.clear();
    }
  }
}

代码示例来源:origin: Tirasa/ConnId

public static void dispose() {
    synchronized (POOLS) {
      // close each pool..
      POOLS.values().forEach(pool -> {
        try {
          pool.shutdown();
        } catch (Exception e) {
          LOG.warn(e, "Failed to close pool: {0}", pool);
        }
      });
      // clear the map of all POOLS..
      POOLS.clear();
    }
  }
}

代码示例来源:origin: net.tirasa.connid/connector-framework-internal

public void dispose() {
    if (configuration instanceof StatefulConfiguration) {
      // dispose it not supposed to throw, but just in case,
      // catch the exception and log it so we know about it
      // but don't let the exception prevent additional
      // cleanup that needs to happen
      try {
        StatefulConfiguration config = (StatefulConfiguration) configuration;
        configuration = null;
        config.release();
      } catch (Exception e) {
        // log this though
        LOG.warn(e, null);
      }
    }
  }
}

代码示例来源:origin: Tirasa/ConnId

public void dispose() {
    if (configuration instanceof StatefulConfiguration) {
      // dispose it not supposed to throw, but just in case,
      // catch the exception and log it so we know about it
      // but don't let the exception prevent additional
      // cleanup that needs to happen
      try {
        StatefulConfiguration config = (StatefulConfiguration) configuration;
        configuration = null;
        config.release();
      } catch (Exception e) {
        // log this though
        LOG.warn(e, null);
      }
    }
  }
}

代码示例来源:origin: org.connid/test-contract

private void initSnapshot() {
  // get snapshot output file, if provided
  String pOut = System.getProperty(PARAM_PROPERTY_OUT_FILE);
  if (StringUtil.isNotBlank(pOut)) {
    try {
      _propertyOutFile = new File(pOut);
      if (!_propertyOutFile.exists()) {
        _propertyOutFile.createNewFile();
      }
      if (!_propertyOutFile.canWrite()) {
        _propertyOutFile = null;
        LOG.warn("Unable to write to ''{0}'' file, the test parameters will not be stored", pOut);
      } else {
        LOG.info("Storing parameter values to ''{0}'', you can rerun the test with the same parameters later", pOut);
      }
    } catch (IOException iOException) {
      LOG.warn("Unable to create ''{0}'' file, the test parameters will not be stored", pOut);
    }
  }
}

代码示例来源:origin: net.tirasa.connid/connector-framework-internal

private static List<URL> buildBundleURLs(File dir) throws MalformedURLException {
  List<URL> rv = getJarFiles(dir);
  if (rv.isEmpty()) {
    getLog().warn("No bundles found in the bundles directory");
  }
  return rv;
}

代码示例来源:origin: org.connid/connid-framework-internal

private static List<URL> buildBundleURLs(File dir) throws MalformedURLException {
  List<URL> rv = getJarFiles(dir);
  if (rv.isEmpty()) {
    getLog().warn("No bundles found in the bundles directory");
  }
  return rv;
}

代码示例来源:origin: Tirasa/ConnId

private static List<URL> buildBundleURLs(File dir) throws MalformedURLException {
  List<URL> rv = getJarFiles(dir);
  if (rv.isEmpty()) {
    getLog().warn("No bundles found in the bundles directory");
  }
  return rv;
}

代码示例来源:origin: net.tirasa.connid/connector-framework-internal

/**
 * Dispose of all object pools and other resources associated with this
 * class.
 */
@Override
public void dispose() {
  super.dispose();
  for (ConnectorFacade facade : CACHE.values()) {
    if (facade instanceof LocalConnectorFacadeImpl) {
      try {
        ((LocalConnectorFacadeImpl) facade).dispose();
      } catch (Exception e) {
        LOG.warn(e, "Failed to dispose facade: {0}", facade);
      }
    }
  }
  CACHE.clear();
}

代码示例来源:origin: Tirasa/ConnId

/**
 * Dispose of all object pools and other resources associated with this
 * class.
 */
@Override
public void dispose() {
  super.dispose();
  for (ConnectorFacade facade : CACHE.values()) {
    if (facade instanceof LocalConnectorFacadeImpl) {
      try {
        ((LocalConnectorFacadeImpl) facade).dispose();
      } catch (Exception e) {
        LOG.warn(e, "Failed to dispose facade: {0}", facade);
      }
    }
  }
  CACHE.clear();
}

代码示例来源:origin: net.tirasa.connid/connector-framework-internal

@Override
public void fillConfiguration(final Configuration config, final Map<String, ? extends Object> configData) {
  final Map<String, Object> configDataCopy = new HashMap<>(configData);
  final ConfigurationPropertiesImpl configProps = JavaClassProperties.createConfigurationProperties(config);
  configProps.getPropertyNames().forEach(propName -> {
    // Remove the entry from the config map, so that at the end
    // the map only contains entries that were not assigned to a config property.
    final Object value = configDataCopy.remove(propName);
    if (value != null) {
      configProps.setPropertyValue(propName, value);
    }
  });
  // The config map now contains entries that were not assigned to a config property.
  configDataCopy.keySet().forEach((propName) -> {
    LOG.warn("Configuration property {0} does not exist!", propName);
  });
  JavaClassProperties.mergeIntoBean(configProps, config);
}

代码示例来源:origin: Tirasa/ConnId

@Override
public void fillConfiguration(final Configuration config, final Map<String, ? extends Object> configData) {
  final Map<String, Object> configDataCopy = new HashMap<>(configData);
  final ConfigurationPropertiesImpl configProps = JavaClassProperties.createConfigurationProperties(config);
  configProps.getPropertyNames().forEach(propName -> {
    // Remove the entry from the config map, so that at the end
    // the map only contains entries that were not assigned to a config property.
    final Object value = configDataCopy.remove(propName);
    if (value != null) {
      configProps.setPropertyValue(propName, value);
    }
  });
  // The config map now contains entries that were not assigned to a config property.
  configDataCopy.keySet().forEach((propName) -> {
    LOG.warn("Configuration property {0} does not exist!", propName);
  });
  JavaClassProperties.mergeIntoBean(configProps, config);
}

代码示例来源:origin: org.connid/connid-framework-internal

public void fillConfiguration(Configuration config, Map<String, ? extends Object> configData) {
  Map<String, Object> configDataCopy = new HashMap<String, Object>(configData);
  ConfigurationPropertiesImpl configProps =
    JavaClassProperties.createConfigurationProperties(config);
  for (String propName : configProps.getPropertyNames()) {
    // Remove the entry from the config map, so that at the end
    // the map only contains entries that were not assigned to a config property.
    Object value = configDataCopy.remove(propName);
    if (value != null) {
      configProps.setPropertyValue(propName, value);
    }
  }
  // The config map now contains entries that were not assigned to a config property.
  for (String propName : configDataCopy.keySet()) {
    _log.warn("Configuration property {0} does not exist!", propName);
  }
  JavaClassProperties.mergeIntoBean(configProps, config);
}

代码示例来源:origin: org.connid/connid-test-contract

/**
 * Creates connector facade, initializes connector configuration from dataProvider and validates configuration
 * and/or tests connection.
 */
public static ConnectorFacade createConnectorFacade(DataProvider dataProvider) {
  ConnectorFacade connector = createConnectorFacade(dataProvider, null);
  // try to test connector configuration and established connection
  if (connector.getSupportedOperations().contains(TestApiOp.class)) {
    connector.test();
  } else {
    LOG.warn("Unable to test validity of connection.  Connector does not suport the Test API. "
        + "Trying at least to test validity of configuration.");
    connector.validate();
  }
  return connector;
}

代码示例来源:origin: org.connid/test-contract

/**
 * Creates connector facade, initializes connector configuration from
 * dataProvider and validates configuration and/or tests connection.
 */
public static ConnectorFacade createConnectorFacade(DataProvider dataProvider) {
  ConnectorFacade connector = createConnectorFacade(dataProvider, null);
  
  // try to test connector configuration and established connection
  if (connector.getSupportedOperations().contains(TestApiOp.class)) {
    connector.test();
  } else {
    LOG.warn("Unable to test validity of connection.  Connector does not suport the Test API. " +
        "Trying at least to test validity of configuration.");
    connector.validate();
  }
  
  return connector;
}

代码示例来源:origin: Tirasa/ConnId

/**
 * Creates connector facade, initializes connector configuration from
 * dataProvider and validates configuration and/or tests connection.
 */
public static ConnectorFacade createConnectorFacade(DataProvider dataProvider) {
  ConnectorFacade connector = createConnectorFacade(dataProvider, null);
  // try to test connector configuration and established connection
  if (connector.getSupportedOperations().contains(TestApiOp.class)) {
    connector.test();
  } else {
    LOG.warn("Unable to test validity of connection.  Connector does not suport the Test API. "
        + "Trying at least to test validity of configuration.");
    connector.validate();
  }
  return connector;
}

相关文章