1 /**
2 * Logback: the reliable, generic, fast and flexible logging framework.
3 * Copyright (C) 1999-2011, QOS.ch. All rights reserved.
4 *
5 * This program and the accompanying materials are dual-licensed under
6 * either the terms of the Eclipse Public License v1.0 as published by
7 * the Eclipse Foundation
8 *
9 * or (per the licensee's choosing)
10 *
11 * under the terms of the GNU Lesser General Public License version 2.1
12 * as published by the Free Software Foundation.
13 */
14 package org.slf4j.impl;
15
16 import org.slf4j.IMarkerFactory;
17 import org.slf4j.MarkerFactory;
18 import org.slf4j.helpers.BasicMarkerFactory;
19 import org.slf4j.spi.MarkerFactoryBinder;
20
21 /**
22 *
23 * The binding of {@link MarkerFactory} class with an actual instance of
24 * {@link IMarkerFactory} is performed using information returned by this class.
25 *
26 * @author Ceki Gülcü
27 */
28 public class StaticMarkerBinder implements MarkerFactoryBinder {
29
30 /**
31 * The unique instance of this class.
32 */
33 public static final StaticMarkerBinder SINGLETON = new StaticMarkerBinder();
34
35 final IMarkerFactory markerFactory = new BasicMarkerFactory();
36
37 private StaticMarkerBinder() {
38 }
39
40 /**
41 * Currently this method always returns an instance of
42 * {@link BasicMarkerFactory}.
43 */
44 public IMarkerFactory getMarkerFactory() {
45 return markerFactory;
46 }
47
48 /**
49 * Currently, this method returns the class name of
50 * {@link BasicMarkerFactory}.
51 */
52 public String getMarkerFactoryClassStr() {
53 return BasicMarkerFactory.class.getName();
54 }
55
56
57 }