KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > jetty6 > JettyServer


1 /**
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.geronimo.jetty6;
18
19 import org.mortbay.jetty.Server;
20 import org.mortbay.jetty.security.UserRealm;
21
22
23 /**
24  * JettyServer extends the base Jetty Server class to prevent managing any user realm information by the web.xml realm name
25  * which is only relevant for basic and digest authentication and should not be tied to any
26  * actual information about which security realm is in use.
27  *
28  * @version $Rev: 482336 $ $Date: 2006-12-04 15:12:19 -0500 (Mon, 04 Dec 2006) $
29  */

30 public class JettyServer extends Server {
31
32     public void addUserRealms(UserRealm[] realms) {
33         throw new IllegalArgumentException JavaDoc("You must supply a security-realm-name to every web module using security features");
34     }
35
36     public void addUserRealm(UserRealm realm) {
37         throw new IllegalArgumentException JavaDoc("You must supply a security-realm-name to every web module using security features");
38     }
39
40     /**
41      * TODO maybe remove intead?
42      *
43      * @param realm
44      * @return
45      * @deprecated
46      */

47     public UserRealm addRealm(UserRealm realm) {
48         throw new IllegalArgumentException JavaDoc("You must supply a security-realm-name to every web module using security features");
49     }
50
51     /**
52      * TODO maybe remove instead?
53      *
54      * @param realmName
55      * @return
56      * @deprecated
57      */

58     public UserRealm getRealm(String JavaDoc realmName) {
59         throw new IllegalArgumentException JavaDoc("You must supply a security-realm-name to every web module using security features");
60     }
61
62     /**
63      * TODO maybe remove instead?
64      *
65      * @param realm
66      * @deprecated
67      */

68     public synchronized void removeRealm(UserRealm realm) {
69         throw new IllegalArgumentException JavaDoc("You must supply a security-realm-name to every web module using security features");
70     }
71
72 }
73
Popular Tags