17ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu/**
27ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * Copyright (c) 2004-2011 QOS.ch
37ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * All rights reserved.
47ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu *
57ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * Permission is hereby granted, free  of charge, to any person obtaining
67ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * a  copy  of this  software  and  associated  documentation files  (the
77ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * "Software"), to  deal in  the Software without  restriction, including
87ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * without limitation  the rights to  use, copy, modify,  merge, publish,
97ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * distribute,  sublicense, and/or sell  copies of  the Software,  and to
107ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * permit persons to whom the Software  is furnished to do so, subject to
117ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * the following conditions:
127ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu *
137ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * The  above  copyright  notice  and  this permission  notice  shall  be
147ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * included in all copies or substantial portions of the Software.
157ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu *
167ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
177ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
187ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
197ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
207ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
217ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
227ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
237ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu *
247ba0605dc97fb81bde8311510d27b3ccba170008Ceki Gulcu */
2588c4c456766193e012eb890e2208473d99b91f83Ceki Gulcupackage org.slf4j.impl;
2688c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu
27d1d27b8d8748190f397b0be72c8d85722f8c5b00Ceki Gulcuimport org.slf4j.helpers.NOPMDCAdapter;
2888c4c456766193e012eb890e2208473d99b91f83Ceki Gulcuimport org.slf4j.spi.MDCAdapter;
2988c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu
3088c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu/**
31d1d27b8d8748190f397b0be72c8d85722f8c5b00Ceki Gulcu * This implementation is bound to {@link NOPMDCAdapter}.
3288c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu *
3388c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu * @author Ceki Gülcü
3488c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu */
3588c4c456766193e012eb890e2208473d99b91f83Ceki Gulcupublic class StaticMDCBinder {
3688c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu
3731212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu    /**
3831212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu     * The unique instance of this class.
3931212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu     */
4031212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu    public static final StaticMDCBinder SINGLETON = new StaticMDCBinder();
4131212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu
4231212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu    private StaticMDCBinder() {
4331212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu    }
4431212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu
4531212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu    /**
4631212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu     * Currently this method always returns an instance of
4731212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu     * {@link NOPMDCAdapter}.
4831212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu     *
4931212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu     * @return instance of NOPMDCAdapter
5031212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu     */
5131212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu    public MDCAdapter getMDCA() {
5231212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu        return new NOPMDCAdapter();
5331212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu    }
5488c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu
5531212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu    public String getMDCAdapterClassStr() {
5631212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu        return NOPMDCAdapter.class.getName();
5731212435723e2dfd5d6716d1f6a7b0e66a1e6b38Ceki Gulcu    }
5888c4c456766193e012eb890e2208473d99b91f83Ceki Gulcu}
59