org.apache.mina.proxy.handlers.http
Class AbstractAuthLogicHandler

java.lang.Object
  extended by org.apache.mina.proxy.handlers.http.AbstractAuthLogicHandler
Direct Known Subclasses:
HttpBasicAuthLogicHandler, HttpDigestAuthLogicHandler, HttpNoAuthLogicHandler, HttpNTLMAuthLogicHandler

public abstract class AbstractAuthLogicHandler
extends Object

AbstractAuthLogicHandler.java - Abstract class that handles an authentication mechanism logic.

Since:
MINA 2.0.0-M3
Author:
Apache MINA Project

Field Summary
protected  ProxyIoSession proxyIoSession
          Object that contains all the proxy authentication session informations.
protected  ProxyRequest request
          The request to be handled by the proxy.
protected  int step
          The current handshake step.
 
Constructor Summary
protected AbstractAuthLogicHandler(ProxyIoSession proxyIoSession)
          Instantiates a handler for the given proxy session.
 
Method Summary
static void addKeepAliveHeaders(Map<String,List<String>> headers)
          Try to force proxy connection to be kept alive.
abstract  void doHandshake(IoFilter.NextFilter nextFilter)
          Method called at each step of the handshaking process.
abstract  void handleResponse(HttpProxyResponse response)
          Handles a HTTP response from the proxy server.
protected  void writeRequest(IoFilter.NextFilter nextFilter, HttpProxyRequest request)
          Sends an HTTP request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

request

protected ProxyRequest request
The request to be handled by the proxy.


proxyIoSession

protected ProxyIoSession proxyIoSession
Object that contains all the proxy authentication session informations.


step

protected int step
The current handshake step.

Constructor Detail

AbstractAuthLogicHandler

protected AbstractAuthLogicHandler(ProxyIoSession proxyIoSession)
                            throws ProxyAuthException
Instantiates a handler for the given proxy session.

Parameters:
proxyIoSession - the proxy session object
Throws:
ProxyAuthException
Method Detail

doHandshake

public abstract void doHandshake(IoFilter.NextFilter nextFilter)
                          throws ProxyAuthException
Method called at each step of the handshaking process.

Parameters:
nextFilter - the next filter
Throws:
ProxyAuthException

handleResponse

public abstract void handleResponse(HttpProxyResponse response)
                             throws ProxyAuthException
Handles a HTTP response from the proxy server.

Parameters:
response - The HTTP response.
Throws:
ProxyAuthException

writeRequest

protected void writeRequest(IoFilter.NextFilter nextFilter,
                            HttpProxyRequest request)
                     throws ProxyAuthException
Sends an HTTP request.

Parameters:
nextFilter - the next filter
request - the request to write
Throws:
ProxyAuthException

addKeepAliveHeaders

public static void addKeepAliveHeaders(Map<String,List<String>> headers)
Try to force proxy connection to be kept alive.

Parameters:
headers - the request headers


Copyright © 2004-2011 Apache MINA Project. All Rights Reserved.