com.acsinet_solutions.cetia4.http
Class J2EEFormHttpCommandProcessor

java.lang.Object
  extended by com.acsinet_solutions.cetia4.http.SimpleHttpCommandProcessor
      extended by com.acsinet_solutions.cetia4.http.J2EEFormHttpCommandProcessor
All Implemented Interfaces:
HttpCommandProcessor

public final class J2EEFormHttpCommandProcessor
extends SimpleHttpCommandProcessor

Simple implmentation of a command processor that may perform optional J2EE Form authentication. Jakarta Commons HTTPClient is used internally.

Author:
Santiago Arriaga

Constructor Summary
J2EEFormHttpCommandProcessor()
          Default construtor
J2EEFormHttpCommandProcessor(java.lang.String base, java.lang.String login, java.lang.String password)
          Parametric construtor
 
Method Summary
 int execute(HttpCommand command, java.io.OutputStream ostream)
          Execute the command request and write the result's contents to the given output stream.
 void setLogin(java.lang.String login)
          Sets the login for authenticated requests.
 void setPassword(java.lang.String password)
          Sets the password for authenticated requests.
 
Methods inherited from class com.acsinet_solutions.cetia4.http.SimpleHttpCommandProcessor
execute, getBase, setBase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

J2EEFormHttpCommandProcessor

public J2EEFormHttpCommandProcessor()
Default construtor


J2EEFormHttpCommandProcessor

public J2EEFormHttpCommandProcessor(java.lang.String base,
                                    java.lang.String login,
                                    java.lang.String password)
Parametric construtor

Method Detail

setLogin

public final void setLogin(java.lang.String login)
Sets the login for authenticated requests. If null, no authentication will be performed


setPassword

public final void setPassword(java.lang.String password)
Sets the password for authenticated requests.


execute

public final int execute(HttpCommand command,
                         java.io.OutputStream ostream)
                  throws java.io.IOException
Description copied from interface: HttpCommandProcessor
Execute the command request and write the result's contents to the given output stream.

Specified by:
execute in interface HttpCommandProcessor
Overrides:
execute in class SimpleHttpCommandProcessor
ostream - The stream where to write the response; may be null.
Returns:
the response status code
Throws:
java.io.IOException