亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mdc.java

?? Java開發最新的日志記錄工具slf4j的源碼
?? JAVA
字號:
/* 
 * Copyright (c) 2004-2007 QOS.ch
 * All rights reserved.
 * 
 * Permission is hereby granted, free  of charge, to any person obtaining
 * a  copy  of this  software  and  associated  documentation files  (the
 * "Software"), to  deal in  the Software without  restriction, including
 * without limitation  the rights to  use, copy, modify,  merge, publish,
 * distribute,  sublicense, and/or sell  copies of  the Software,  and to
 * permit persons to whom the Software  is furnished to do so, subject to
 * the following conditions:
 * 
 * The  above  copyright  notice  and  this permission  notice  shall  be
 * included in all copies or substantial portions of the Software.
 * 
 * THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
 * EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
 * MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package org.slf4j;

import java.util.Map;

import org.slf4j.helpers.BasicMDCAdapter;
import org.slf4j.helpers.Util;
import org.slf4j.impl.StaticMDCBinder;
import org.slf4j.spi.MDCAdapter;

/**
 * This class hides and serves as a substitute for the underlying logging
 * system's MDC implementation.
 * 
 * <p>
 * If the underlying logging system offers MDC functionality, then SLF4J's MDC,
 * i.e. this class, will delegate to the underlying system's MDC. Note that at
 * this time, only two logging systems, namely log4j and logback, offer MDC
 * functionality. If the underlying system does not support MDC, e.g. java.util.logging, 
 * then SLF4J will use a {@link BasicMDCAdapter}. 
 * 
 * <p>
 * Thus, as a SLF4J user, you can take advantage of MDC in the presence of log4j
 * logback, or java.util.logging, but without forcing these systems as dependencies 
 * upon your users.
 * 
 * <p>
 * For more information on MDC please see the <a
 * href="http://logback.qos.ch/manual/mdc.html">chapter on MDC</a> in the
 * logback manual.
 * 
 * <p>
 * Please note that all methods in this class are static.
 * 
 * @author Ceki G&uuml;lc&uuml;
 * @since 1.4.1
 */
public class MDC {

  static final String NULL_MDCA_URL = "http://www.slf4j.org/codes.html#null_MDCA";
  static final String NO_STATIC_MDC_BINDER_URL = "http://www.slf4j.org/codes.html#no_static_mdc_binder";
  static MDCAdapter mdcAdapter;

  private MDC() {
  }

  static {
    try {
      mdcAdapter = StaticMDCBinder.SINGLETON.getMDCA();
    } catch (NoClassDefFoundError ncde) {
      String msg = ncde.getMessage();
      if (msg != null && msg.indexOf("org/slf4j/impl/StaticMDCBinder") != -1) {
        Util
            .reportFailure("Failed to load class \"org.slf4j.impl.StaticMDCBinder\".");
        Util.reportFailure("See " + NO_STATIC_MDC_BINDER_URL
            + " for further details.");

      }
      throw ncde;
    } catch (Exception e) {
      // we should never get here
      Util.reportFailure("Could not bind with an instance of class ["
          + StaticMDCBinder.SINGLETON.getMDCAdapterClassStr() + "]", e);
    }
  }

  /**
   * Put a context value (the <code>val</code> parameter) as identified with
   * the <code>key</code> parameter into the current thread's context map.
   * The <code>key</code> parameter cannot be null. The <code>val</code> parameter 
   * can be null only if the underlying implementation supports it.
   * 
   * <p>
   * This method delegates all work to the MDC of the underlying logging system.
   * 
   * @throws IllegalArgumentException in case the "key" parameter is null
   */
  public static void put(String key, String val) throws IllegalArgumentException {
    if (key == null) {
      throw new IllegalArgumentException("key parameter cannot be null");
    }
    if (mdcAdapter == null) {
      throw new IllegalStateException("MDCAdapter cannot be null. See also "
          + NULL_MDCA_URL);
    }
    mdcAdapter.put(key, val);
  }

  /**
   * Get the context identified by the <code>key</code> parameter. The 
   * <code>key</code> parameter cannot be null.
   * 
   * <p>This method delegates all work to the MDC of the underlying logging system. 
   * 
   * @return the string value identified by the <code>key</code> parameter.
   * @throws IllegalArgumentException in case the "key" parameter is null
   */
  public static String get(String key) throws IllegalArgumentException {
    if (key == null) {
      throw new IllegalArgumentException("key parameter cannot be null");
    }
    
    if (mdcAdapter == null) {
      throw new IllegalStateException("MDCAdapter cannot be null. See also "
          + NULL_MDCA_URL);
    }
    return mdcAdapter.get(key);
  }

  /**
   * Remove the the context identified by the <code>key</code> parameter using
   * the underlying system's MDC implementation. The  <code>key</code> parameter 
   * cannot be null. This method does nothing if there is no previous value 
   * associated with <code>key</code>.
   * 
   * @throws IllegalArgumentException in case the "key" parameter is null
   */
  public static void remove(String key) throws IllegalArgumentException {
    if (key == null) {
      throw new IllegalArgumentException("key parameter cannot be null");
    }
    
    if (mdcAdapter == null) {
      throw new IllegalStateException("MDCAdapter cannot be null. See also "
          + NULL_MDCA_URL);
    }
    mdcAdapter.remove(key);
  }

  /** 
   * Clear all entries in the MDC of the underlying implementation.
   */
  public static void clear() {
    if (mdcAdapter == null) {
      throw new IllegalStateException("MDCAdapter cannot be null. See also "
          + NULL_MDCA_URL);
    }
    mdcAdapter.clear();
  }
  
  /**
   * Return a copy of the current thread's context map, with keys and 
   * values of type String. Returned value may be null.
   * 
   * @return A copy of the current thread's context map. May be null.
   * @since 1.5.1
   */
  public static Map getCopyOfContextMap() {
    if (mdcAdapter == null) {
      throw new IllegalStateException("MDCAdapter cannot be null. See also "
          + NULL_MDCA_URL);
    }
    return mdcAdapter.getCopyOfContextMap();
  }

  /**
   * Set the current thread's context map by first clearing any existing 
   * map and then copying the map passed as parameter. The context map passed
   * as parameter must only contain keys and values of type String.
   * 
   * @param contextMap must contain only keys and values of type String
   * @since 1.5.1
   */
  public static void setContextMap(Map contextMap) {
    if (mdcAdapter == null) {
      throw new IllegalStateException("MDCAdapter cannot be null. See also "
          + NULL_MDCA_URL);
    }
    mdcAdapter.setContextMap(contextMap);
  }
  
  
  /**
   * Returns the MDCAdapter instance currently in use.
   * 
   * @return the MDcAdapter instance currently in use.
   * @since 1.4.2
   */
  public static MDCAdapter getMDCAdapter() {
    return mdcAdapter;
  }
  
  
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丁香另类激情小说| 国内精品国产成人国产三级粉色 | 樱桃视频在线观看一区| 久久久久国产精品麻豆ai换脸| 制服丝袜一区二区三区| 日韩一区二区三区观看| 日韩亚洲欧美成人一区| 日韩一区二区中文字幕| 欧美精品一区二区三区在线 | 亚洲欧美怡红院| 亚洲精品国产精品乱码不99| 一区二区免费看| 日韩二区在线观看| 国产乱人伦偷精品视频不卡| 丰满亚洲少妇av| 91精品91久久久中77777| 欧美亚洲国产一卡| 欧美一区二区三区男人的天堂 | 国产成人在线免费| www.欧美.com| 欧美在线不卡视频| 欧美一区二区日韩| 日本一区二区三区国色天香 | 欧美日韩成人在线| 久久综合色鬼综合色| 国产精品福利一区| 天天综合天天做天天综合| 精久久久久久久久久久| 色综合视频一区二区三区高清| 欧美午夜精品理论片a级按摩| 日韩亚洲欧美在线| 亚洲手机成人高清视频| 蜜臀久久99精品久久久久宅男| 国产高清精品在线| 欧美性猛片aaaaaaa做受| 久久精品一区二区| 亚洲a一区二区| 高清在线成人网| 欧美老人xxxx18| 国产精品丝袜在线| 蜜桃一区二区三区在线观看| av动漫一区二区| 精品少妇一区二区三区在线播放 | 国产不卡免费视频| 欧美精选一区二区| 亚洲欧洲av一区二区三区久久| 日韩成人dvd| 91视频观看免费| 久久嫩草精品久久久精品| 亚洲伊人色欲综合网| 懂色中文一区二区在线播放| 91麻豆精品国产91久久久更新时间 | 欧美视频日韩视频| 中文字幕欧美激情| 国产中文一区二区三区| 91精品久久久久久久久99蜜臂| 亚洲精品免费一二三区| 国产成人综合网| 久久久99精品久久| 蜜臀av性久久久久蜜臀av麻豆| 欧美日韩一区二区三区高清| 专区另类欧美日韩| 成人性生交大合| 国产亚洲欧洲997久久综合 | 欧美在线一区二区三区| 国产精品另类一区| 国产精品影视网| 2020国产成人综合网| 麻豆国产欧美日韩综合精品二区 | 亚洲精品一二三四区| 9i看片成人免费高清| 国产精品超碰97尤物18| 高清不卡一区二区| 欧美国产精品专区| 成人精品免费视频| 中文字幕亚洲区| 91麻豆免费看| 亚洲资源在线观看| 制服丝袜亚洲播放| 蜜臀av国产精品久久久久| 欧美xxxxxxxxx| 国产一区二区毛片| 中文天堂在线一区| 日本道免费精品一区二区三区| 亚洲精品欧美激情| 欧美精品久久久久久久多人混战| 青青草国产成人av片免费| 日韩美女一区二区三区四区| 国产一区二区在线影院| 中文字幕欧美区| 色欧美片视频在线观看| 亚洲自拍另类综合| 精品黑人一区二区三区久久 | 日韩二区在线观看| 久久综合999| 在线亚洲欧美专区二区| 日韩高清在线一区| 久久久久久久av麻豆果冻| 91色乱码一区二区三区| 日韩不卡在线观看日韩不卡视频| 久久久久88色偷偷免费| 91蜜桃在线免费视频| 亚洲 欧美综合在线网络| 久久久久久97三级| 色综合天天综合| 亚洲欧美偷拍卡通变态| 3atv一区二区三区| 成人手机在线视频| 爽好久久久欧美精品| 久久精品在这里| 337p亚洲精品色噜噜噜| zzijzzij亚洲日本少妇熟睡| 天天综合天天综合色| 亚洲国产成人一区二区三区| 欧美日韩国产一区二区三区地区| 国产精品自拍网站| 天天色综合天天| 亚洲天堂久久久久久久| 日韩精品专区在线影院观看| 91啪在线观看| 狠狠色综合播放一区二区| 亚洲在线观看免费视频| 中文字幕av资源一区| 日韩手机在线导航| 欧美日韩免费不卡视频一区二区三区| 国产精品18久久久久| 日韩成人一区二区三区在线观看| 国产精品久久久久aaaa樱花| 精品免费一区二区三区| 欧美性色黄大片手机版| 色婷婷久久一区二区三区麻豆| 国产原创一区二区三区| 免费在线观看一区二区三区| 一区二区三区免费看视频| 国产精品伦理在线| 国产欧美一二三区| 精品国产免费久久| 337p亚洲精品色噜噜狠狠| 欧美日韩一区二区三区高清 | 久久综合色天天久久综合图片| 欧美亚洲高清一区| 色综合久久综合网97色综合| 成人激情视频网站| 国产福利一区二区三区在线视频| 蜜桃久久av一区| 久久精品国产在热久久| 日本午夜一本久久久综合| 亚洲一区二区三区影院| 亚洲一区二区三区中文字幕在线| 亚洲人123区| 有码一区二区三区| 夜夜爽夜夜爽精品视频| 亚洲亚洲人成综合网络| 亚洲自拍偷拍麻豆| 日韩国产在线观看一区| 日韩激情一区二区| 精品一区二区三区在线观看国产| 日韩av在线发布| 精彩视频一区二区| 国模套图日韩精品一区二区| 成人在线一区二区三区| 岛国av在线一区| 91在线看国产| 欧美日本韩国一区二区三区视频| 这里是久久伊人| 亚洲精品在线免费播放| 国产日韩精品视频一区| 综合激情成人伊人| 图片区小说区国产精品视频| 狠狠色狠狠色综合| 成人国产精品免费网站| 欧美中文字幕一区| 欧美第一区第二区| 中文字幕一区在线观看视频| 亚洲一区二区三区在线播放| 蜜臀av性久久久久蜜臀av麻豆| 国产精品一二三| 91同城在线观看| 欧美不卡在线视频| 综合色天天鬼久久鬼色| 日韩av网站在线观看| 国产成人免费网站| 中文字幕精品一区二区精品绿巨人| 五月婷婷综合激情| 欧美性色aⅴ视频一区日韩精品| 欧美三级日韩三级| 精品国产一区二区三区不卡| 精品国产伦一区二区三区观看体验 | 欧美经典一区二区| 亚洲综合偷拍欧美一区色| 精品一区二区三区香蕉蜜桃| 色综合欧美在线| 久久久久久久电影| 日韩1区2区日韩1区2区| 99视频精品在线| 久久精品视频在线免费观看| 亚洲综合一区在线| 成人黄色电影在线| 日韩欧美一区二区视频| 一区二区久久久久久|