001/**
002 * Logback: the reliable, generic, fast and flexible logging framework.
003 * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
004 *
005 * This program and the accompanying materials are dual-licensed under
006 * either the terms of the Eclipse Public License v1.0 as published by
007 * the Eclipse Foundation
008 *
009 *   or (per the licensee's choosing)
010 *
011 * under the terms of the GNU Lesser General Public License version 2.1
012 * as published by the Free Software Foundation.
013 */
014package ch.qos.logback.classic.spi;
015
016import java.io.Serializable;
017
018import ch.qos.logback.classic.LoggerContext;
019
020/**
021 * An interface that allows Logger objects and LoggerSer objects to be used the
022 * same way be client of the LoggingEvent object.
023 * <p>
024 * See {@link LoggerContextVO} for the rationale of this class.
025 * 
026 * @author Ceki G&uuml;lc&uuml;
027 * @author S&eacute;bastien Pennec
028 */
029public class LoggerRemoteView implements Serializable {
030
031    private static final long serialVersionUID = 5028223666108713696L;
032
033    final LoggerContextVO loggerContextView;
034    final String name;
035
036    public LoggerRemoteView(String name, LoggerContext lc) {
037        this.name = name;
038        assert lc.getLoggerContextRemoteView() != null;
039        loggerContextView = lc.getLoggerContextRemoteView();
040    }
041
042    public LoggerContextVO getLoggerContextView() {
043        return loggerContextView;
044    }
045
046    public String getName() {
047        return name;
048    }
049
050}