View Javadoc
1   /*
2    * Copyright (c) 2004-2005 QOS.ch
3    *
4    * All rights reserved.
5    *
6    * Permission is hereby granted, free of charge, to any person obtaining
7    * a copy of this software and associated documentation files (the
8    * "Software"), to  deal in  the Software without  restriction, including
9    * without limitation  the rights to  use, copy, modify,  merge, publish,
10   * distribute, and/or sell copies of  the Software, and to permit persons
11   * to whom  the Software is furnished  to do so, provided  that the above
12   * copyright notice(s) and this permission notice appear in all copies of
13   * the  Software and  that both  the above  copyright notice(s)  and this
14   * permission notice appear in supporting documentation.
15   *
16   * THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
17   * EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
18   * MERCHANTABILITY, FITNESS FOR  A PARTICULAR PURPOSE AND NONINFRINGEMENT
19   * OF  THIRD PARTY  RIGHTS. IN  NO EVENT  SHALL THE  COPYRIGHT  HOLDER OR
20   * HOLDERS  INCLUDED IN  THIS  NOTICE BE  LIABLE  FOR ANY  CLAIM, OR  ANY
21   * SPECIAL INDIRECT  OR CONSEQUENTIAL DAMAGES, OR  ANY DAMAGES WHATSOEVER
22   * RESULTING FROM LOSS  OF USE, DATA OR PROFITS, WHETHER  IN AN ACTION OF
23   * CONTRACT, NEGLIGENCE  OR OTHER TORTIOUS  ACTION, ARISING OUT OF  OR IN
24   * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25   *
26   * Except as  contained in  this notice, the  name of a  copyright holder
27   * shall not be used in advertising or otherwise to promote the sale, use
28   * or other dealings in this Software without prior written authorization
29   * of the copyright holder.
30   *
31   */
32  
33  package org.slf4j.osgi.logservice.impl;
34  
35  import org.osgi.framework.Bundle;
36  import org.osgi.framework.ServiceFactory;
37  import org.osgi.framework.ServiceRegistration;
38  
39  /**
40   * <code>LogServiceFactory</code> creates LogService implementations.
41   *
42   * @author John Conlon
43   * @version $Rev$, $Date$
44   */
45  public class LogServiceFactory implements ServiceFactory {
46      /*
47       * (non-Javadoc)
48       * 
49       * @see org.osgi.framework.ServiceFactory#getService(org.osgi.framework.Bundle,
50       * org.osgi.framework.ServiceRegistration)
51       */
52      public Object getService(Bundle bundle, ServiceRegistration arg1) {
53          return new LogServiceImpl(bundle);
54      }
55  
56      /*
57       * (non-Javadoc)
58       * 
59       * @see org.osgi.framework.ServiceFactory#ungetService(org.osgi.framework.Bundle,
60       * org.osgi.framework.ServiceRegistration, java.lang.Object)
61       */
62      public void ungetService(Bundle bundle, ServiceRegistration arg1, Object arg2) {
63          // nothing to do.
64      }
65  }