View Javadoc

    1   /* Copyright 2004 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,v 1.4 2005/11/17 00:55:50 benalex Exp $
    37   */
    38  public interface ChannelEntryPoint {
    39      //~ Methods ================================================================
    40
    41      /***
    42       * Commences a secure channel.
    43       *
    44       * <P>
    45       * Implementations should modify the headers on the
    46       * <code>ServletResponse</code> as necessary to commence the user agent
    47       * using the implementation's supported channel type.
    48       * </p>
    49       *
    50       * @param request that a <code>ChannelProcessor</code> has rejected
    51       * @param response so that the user agent can begin using a new channel
    52       */
    53      public void commence(ServletRequest request, ServletResponse response)
    54          throws IOException, ServletException;
    55  }