001/* 002 * Copyright (c) 2004-2005 QOS.ch 003 * 004 * All rights reserved. 005 * 006 * Permission is hereby granted, free of charge, to any person obtaining 007 * a copy of this software and associated documentation files (the 008 * "Software"), to deal in the Software without restriction, including 009 * without limitation the rights to use, copy, modify, merge, publish, 010 * distribute, and/or sell copies of the Software, and to permit persons 011 * to whom the Software is furnished to do so, provided that the above 012 * copyright notice(s) and this permission notice appear in all copies of 013 * the Software and that both the above copyright notice(s) and this 014 * permission notice appear in supporting documentation. 015 * 016 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 017 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 018 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 019 * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 020 * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY 021 * SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER 022 * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF 023 * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 024 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 025 * 026 * Except as contained in this notice, the name of a copyright holder 027 * shall not be used in advertising or otherwise to promote the sale, use 028 * or other dealings in this Software without prior written authorization 029 * of the copyright holder. 030 * 031 */ 032 033package org.slf4j.osgi.logservice.impl; 034 035import org.osgi.framework.Bundle; 036import org.osgi.framework.ServiceFactory; 037import org.osgi.framework.ServiceRegistration; 038 039/** 040 * <code>LogServiceFactory</code> creates LogService implementations. 041 * 042 * @author John Conlon 043 * @version $Rev$, $Date$ 044 */ 045public class LogServiceFactory implements ServiceFactory { 046 /* 047 * (non-Javadoc) 048 * 049 * @see org.osgi.framework.ServiceFactory#getService(org.osgi.framework.Bundle, 050 * org.osgi.framework.ServiceRegistration) 051 */ 052 public Object getService(Bundle bundle, ServiceRegistration arg1) { 053 return new LogServiceImpl(bundle); 054 } 055 056 /* 057 * (non-Javadoc) 058 * 059 * @see org.osgi.framework.ServiceFactory#ungetService(org.osgi.framework.Bundle, 060 * org.osgi.framework.ServiceRegistration, java.lang.Object) 061 */ 062 public void ungetService(Bundle bundle, ServiceRegistration arg1, Object arg2) { 063 // nothing to do. 064 } 065}