1 /** 2 * PETALS - PETALS Services Platform. 3 * Copyright (c) 2005 Fossil E-Commerce, http://www.fossilec.com/ 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * 18 * ------------------------------------------------------------------------- 19 * $Id: ServiceContext.java 292 2006-05-02 07:30:43Z ddesjardins $ 20 * ------------------------------------------------------------------------- 21 */ 22 package org.objectweb.petals; 23 24 import org.objectweb.util.monolog.api.Logger; 25 26 /** 27 * @version $Rev: 292 $ $Date: 2006-05-02 07:30:43Z $ 28 * @since Petals 1.0 29 * @author <a HREF="mailto:rmarins@fossilec.com">Rafael Marins</a> 30 * TODO check if it is necessary to keep this class 31 */ 32 public interface ServiceContext { 33 34 /** 35 * This method permits to fetch a Logger. If the Logger described by the 36 * parameters does not exist, then the ServiceContext must return a new 37 * instance of Logger. The key parameter is a description of the expected 38 * Logger. In simple cases, the key is the initial topic of the Logger. 39 * 40 * @param key 41 * @return a {@link Logger} instance. 42 */ 43 public Logger getLogger(String key); 44 45 /** 46 * This method permits to fetch a Logger. If the Logger described by the 47 * parameters does not exist, then the ServiceContext must return a new 48 * instance of Logger. The key parameter is a description of the expected 49 * Logger. In simple cases, the key is the initial topic of the Logger. 50 * The resourceBundleName parameter allows specifying the name of a 51 * resource bundle in order to internationalise the logging. 52 * 53 * @param key 54 * @param resourceBundleName 55 * @return a {@link Logger} instance. 56 */ 57 public Logger getLogger(String key, String resourceBundleName); 58 59 } 60