de.unkrig.commons.net.http.servlett
Class HttpAuthenticationServlett

java.lang.Object
  extended by de.unkrig.commons.net.http.servlett.AbstractServlett
      extended by de.unkrig.commons.net.http.servlett.HttpAuthenticationServlett
All Implemented Interfaces:
Servlett, java.io.Closeable

public class HttpAuthenticationServlett
extends AbstractServlett

A Servlett that processes the AUTHENTICATION information in the HTTp request, and passes control to the next servlett iff authentication is successfully completed.


Constructor Summary
HttpAuthenticationServlett(java.lang.String realm, java.lang.String userName, java.lang.String password)
           
 
Method Summary
 HttpResponse handleRequest(HttpRequest httpRequest)
          Forwards the HTTP requests it receives to AbstractServlett.get(HttpRequest), AbstractServlett.head(HttpRequest), AbstractServlett.post(HttpRequest), AbstractServlett.put(HttpRequest), depending on the HTTP method.
 
Methods inherited from class de.unkrig.commons.net.http.servlett.AbstractServlett
close, get, getOrPost, head, post, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpAuthenticationServlett

public HttpAuthenticationServlett(java.lang.String realm,
                                  java.lang.String userName,
                                  java.lang.String password)
Method Detail

handleRequest

@Nullable
public HttpResponse handleRequest(HttpRequest httpRequest)
Description copied from class: AbstractServlett
Forwards the HTTP requests it receives to AbstractServlett.get(HttpRequest), AbstractServlett.head(HttpRequest), AbstractServlett.post(HttpRequest), AbstractServlett.put(HttpRequest), depending on the HTTP method.

Specified by:
handleRequest in interface Servlett
Overrides:
handleRequest in class AbstractServlett
Returns:
null iff this handler cannot handle the httpRequest