View Javadoc

1   /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
2    *
3    * Licensed under the Apache License, Version 2.0 (the "License");
4    * you may not use this file except in compliance with the License.
5    * You may obtain a copy of the License at
6    *
7    *     http://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */
15  
16  package org.acegisecurity.securechannel;
17  
18  import java.io.IOException;
19  
20  import javax.servlet.ServletException;
21  import javax.servlet.ServletRequest;
22  import javax.servlet.ServletResponse;
23  
24  
25  /**
26   * May be used by a {@link ChannelProcessor} to launch a web channel.
27   *
28   * <P>
29   * <code>ChannelProcessor</code>s can elect to launch a new web channel
30   * directly, or they can delegate to another class. The
31   * <code>ChannelEntryPoint</code> is a pluggable interface to assist
32   * <code>ChannelProcessor</code>s in performing this delegation.
33   * </p>
34   *
35   * @author Ben Alex
36   * @version $Id: ChannelEntryPoint.java 1784 2007-02-24 21:00:24Z luke_t $
37   */
38  public interface ChannelEntryPoint {
39      //~ Methods ========================================================================================================
40  
41      /**
42       * Commences a secure channel.<P>Implementations should modify the headers on the
43       * <code>ServletResponse</code> as necessary to commence the user agent using the implementation's supported
44       * channel type.</p>
45       *
46       * @param request that a <code>ChannelProcessor</code> has rejected
47       * @param response so that the user agent can begin using a new channel
48       *
49       * @throws IOException DOCUMENT ME!
50       * @throws ServletException DOCUMENT ME!
51       */
52      void commence(ServletRequest request, ServletResponse response)
53          throws IOException, ServletException;
54  }