Open SiteSearch 4.1.1
Final

ORG.oclc.jassi
Class HttpMessage

java.lang.Object
  |
  +--ORG.oclc.jassi.HttpMessage

public class HttpMessage
extends Object

The HttpMessage class reads in the HTTP request from the Standard HTTPD Server, stores the sessionid and threadid values passed in the SessionID and ThreadID HTTP headers, and checks the Content-length to see if there is an HTTP body message present.


Constructor Summary
HttpMessage(BufferedReader sockin)
          Constructs a HttpMessage object using the input socket parameter.
 
Method Summary
 int getContentLength()
          Get "Content-Length" value from the input Http Message.
static int getContentLength(String httpMessage)
          Get "Content-Length" value from the input Http Message.
 String getDefaultHTTPHeader(String body)
          Creates a default HTTP header using an input HTTP body message.
 DataPairs getHTTPMsg()
          Returns the HTTP request as a DataPairs object.
 StringBuffer getRawHTTPMsg()
          Returns the raw HTTP request as a StringBuffer.
 String getSessionid()
          Returns the sessionid value from the HTTP SessionID header in this HTTP request.
 boolean getSTOPCommandIssued()
          Tests for a STOP thread command issued by the browser.
 String getThreadid()
          Returns the threadid value from the HTTP ThreadID header in this HTTP request.
static int parseContentLength(String httpMessage)
           
 String toString()
          Generates the String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpMessage

public HttpMessage(BufferedReader sockin)
Constructs a HttpMessage object using the input socket parameter.
Parameters:
sockin - the socket connection in JaSSI that reads the HTTP request.
Method Detail

getContentLength

public int getContentLength()
Get "Content-Length" value from the input Http Message.

getContentLength

public static final int getContentLength(String httpMessage)
Get "Content-Length" value from the input Http Message. Depricated

getDefaultHTTPHeader

public final String getDefaultHTTPHeader(String body)
Creates a default HTTP header using an input HTTP body message.
Returns:
the String containing the default HTTP header.

getHTTPMsg

public final DataPairs getHTTPMsg()
Returns the HTTP request as a DataPairs object.
Returns:
the DataPairs object containing the HTTP request.

getRawHTTPMsg

public final StringBuffer getRawHTTPMsg()
Returns the raw HTTP request as a StringBuffer.
Returns:
the StringBuffer containing the raw HTTP request.

getSessionid

public final String getSessionid()
Returns the sessionid value from the HTTP SessionID header in this HTTP request.
Returns:
a String containing the sessionid value for this HTTP request.

getSTOPCommandIssued

public final boolean getSTOPCommandIssued()
Tests for a STOP thread command issued by the browser.
Returns:
a true if the browser issued a STOP command and false otherwise.

getThreadid

public final String getThreadid()
Returns the threadid value from the HTTP ThreadID header in this HTTP request.
Returns:
a String containing the threadid value for this HTTP request.

parseContentLength

public static final int parseContentLength(String httpMessage)

toString

public final String toString()
Generates the String representation of this object.
Returns:
the String representation of this object
Overrides:
toString in class Object

Open SiteSearch 4.1.1
Final