KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > server > servlet > BootStrapContextImpl


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.server.servlet;
10
11 import javax.servlet.ServletContext JavaDoc;
12
13 /**
14  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
15  * @version $Revision: 1.1.1.1 $
16  */

17 public class BootStrapContextImpl implements BootStrapContext
18 {
19
20    private ServletContext JavaDoc servletContext;
21    private ClassLoader JavaDoc classLoader;
22
23    public BootStrapContextImpl(ServletContext JavaDoc servletContext, ClassLoader JavaDoc classLoader)
24    {
25       if (servletContext == null)
26       {
27          throw new IllegalArgumentException JavaDoc("Bootstrap servlet context cannot be null");
28       }
29       if (classLoader == null)
30       {
31          throw new IllegalArgumentException JavaDoc("Bootstrap classLoader context cannot be null");
32       }
33       this.servletContext = servletContext;
34       this.classLoader = classLoader;
35    }
36
37    public ServletContext JavaDoc getServletContext()
38    {
39       return servletContext;
40    }
41
42    public ClassLoader JavaDoc getClassLoader()
43    {
44       return classLoader;
45    }
46 }
47
Popular Tags