001    /**
002     *  Licensed to the Apache Software Foundation (ASF) under one or more
003     *  contributor license agreements.  See the NOTICE file distributed with
004     *  this work for additional information regarding copyright ownership.
005     *  The ASF licenses this file to You under the Apache License, Version 2.0
006     *  (the "License"); you may not use this file except in compliance with
007     *  the License.  You may obtain a copy of the License at
008     *
009     *     http://www.apache.org/licenses/LICENSE-2.0
010     *
011     *  Unless required by applicable law or agreed to in writing, software
012     *  distributed under the License is distributed on an "AS IS" BASIS,
013     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     *  See the License for the specific language governing permissions and
015     *  limitations under the License.
016     */
017    package org.apache.geronimo.jetty6;
018    
019    import java.util.Set;
020    import java.util.Map;
021    import java.lang.reflect.InvocationTargetException;
022    
023    import javax.naming.Context;
024    import javax.security.auth.Subject;
025    import javax.security.auth.login.LoginException;
026    
027    import org.mortbay.jetty.servlet.ServletHandler;
028    import org.mortbay.jetty.servlet.ServletHolder;
029    import org.apache.geronimo.jetty6.handler.AbstractImmutableHandler;
030    import org.apache.geronimo.security.deploy.SubjectInfo;
031    
032    /**
033     * @version $Rev: 545781 $ $Date: 2007-06-09 13:44:02 -0400 (Sat, 09 Jun 2007) $
034     */
035    public interface JettyServletRegistration {
036    
037        void registerServletHolder(ServletHolder servletHolder, String servletName, Set<String> servletMappings, String objectName) throws Exception;
038    
039        void unregisterServletHolder(ServletHolder servletHolder, String servletName, Set<String> servletMappings, String objectName) throws Exception;
040    
041        ServletHandler getServletHandler();
042    
043        ClassLoader getWebClassLoader();
044    
045        AbstractImmutableHandler getLifecycleChain();
046    
047        Object newInstance(String className) throws InstantiationException, IllegalAccessException;
048    
049        void destroyInstance(Object o) throws Exception;
050    
051        Subject getSubjectForRole(String role) throws LoginException;
052    }