Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

sosc::AbstractPost Class Reference

List of all members.

Public Methods

 AbstractPost (javax.servlet.jsp.JspWriter out, String server, String script)
 AbstractPost (String server, String script) throws Exception
 AbstractPost (String server, String script, int httpversion) throws Exception

Protected Methods

void setServer (String server)
void setScript (String script)
Map executeRequest (Map input) throws Exception
abstract Map encode (Map unencoded) throws Exception
abstract Map decode (BufferedReader in) throws Exception

Private Methods

void setLogger (String log)

Private Attributes

int httpversion = 1
String server = ""
String script = ""
boolean debug = false

Detailed Description

This class handles the basic communication with a provider to make a payment and return post information. <p/> All providers need to extend this class and implement its abstract methods in the following way:


Map encode ( Map unencoded ) throws Exception
Prepares a map for transmission.

Map decode ( BufferedReader in ) throws Exception
Prepares the returned stream from the server.

Definition at line 48 of file AbstractPost.java.


Constructor & Destructor Documentation

sosc::AbstractPost::AbstractPost javax.servlet.jsp.JspWriter    out,
String    server,
String    script
[inline]
 

This constructor is deprecated.

Definition at line 62 of file AbstractPost.java.

References sosc::AbstractPost::script, and sosc::AbstractPost::server.

sosc::AbstractPost::AbstractPost String    server,
String    script
throws Exception [inline]
 

Definition at line 67 of file AbstractPost.java.

References sosc::AbstractPost::debug, sosc::AbstractPost::script, and sosc::AbstractPost::server.

sosc::AbstractPost::AbstractPost String    server,
String    script,
int    httpversion
throws Exception [inline]
 

Definition at line 73 of file AbstractPost.java.

References sosc::AbstractPost::debug, sosc::AbstractPost::httpversion, sosc::AbstractPost::script, and sosc::AbstractPost::server.


Member Function Documentation

abstract Map sosc::AbstractPost::decode BufferedReader    in throws Exception [protected, pure virtual]
 

Override this method for new processors. We want every value returned to parsed and kicked back in the form of a map.

TODO: can't just roll over the header, cause their may be cookies... instead, look for the end of the header and go from there.

Referenced by sosc::AbstractPost::executeRequest().

abstract Map sosc::AbstractPost::encode Map    unencoded throws Exception [protected, pure virtual]
 

Override this method for new processors. We assume that the map being passed in is of strings and not arrays.

Referenced by sosc::AbstractPost::executeRequest().

Map sosc::AbstractPost::executeRequest Map    input throws Exception [inline, protected]
 

executeRequest() <br/> Gets a SSL connection with the server, formats and sends a HTTP request, receives the server response, and parses the response into a Hashmap.

For now, this is always a post. i guess you could override it to do a get, but why bother.

Definition at line 112 of file AbstractPost.java.

References sosc::AbstractPost::decode(), sosc::AbstractPost::encode(), sosc::AbstractPost::httpversion, sosc::AbstractPost::script, and sosc::AbstractPost::server.

void sosc::AbstractPost::setLogger String    log [inline, private]
 

I am broken. =(

Definition at line 210 of file AbstractPost.java.

void sosc::AbstractPost::setScript String    script [inline, protected]
 

A way to set the server during the lifetime of a post.

Definition at line 98 of file AbstractPost.java.

References sosc::AbstractPost::script.

void sosc::AbstractPost::setServer String    server [inline, protected]
 

A way to set the script during the lifetime of a post.

Definition at line 91 of file AbstractPost.java.

References sosc::AbstractPost::server.


Member Data Documentation

boolean sosc::AbstractPost::debug = false [private]
 

same old

Definition at line 57 of file AbstractPost.java.

Referenced by sosc::AbstractPost::AbstractPost().

int sosc::AbstractPost::httpversion = 1 [private]
 

version of http to use to connect to server

Definition at line 51 of file AbstractPost.java.

Referenced by sosc::AbstractPost::AbstractPost(), and sosc::AbstractPost::executeRequest().

String sosc::AbstractPost::script = "" [private]
 

the rest of the url

Definition at line 55 of file AbstractPost.java.

Referenced by sosc::AbstractPost::AbstractPost(), sosc::AbstractPost::executeRequest(), and sosc::AbstractPost::setScript().

String sosc::AbstractPost::server = "" [private]
 

the server we are gonna hit

Definition at line 53 of file AbstractPost.java.

Referenced by sosc::AbstractPost::AbstractPost(), sosc::AbstractPost::executeRequest(), and sosc::AbstractPost::setServer().


The documentation for this class was generated from the following file:
Generated on Mon Jul 14 17:19:21 2003 for SOSC by doxygen1.2.15