WebServex
Class HTTPClient

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--WebServex.HTTPClient
All Implemented Interfaces:
java.lang.Runnable

public class HTTPClient
extends java.lang.Thread

HTTPClient extends Thread and connects to HTTP server sends the message and collects the returned message and adds it to Stats' collection of TransactionReports


Field Summary
static byte[] c
           
static byte[] c1
           
static java.lang.String CRLF
          Cariage Return LineFeed as String
static java.lang.String LF
           
static java.lang.String SPACE
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
HTTPClient(Stats st)
          Creates new HTTPClient Generally the constructor establishes the connection and designates the input and output streams and sets up all the neccessary information in addition builds the HTTP requests texts as well this constructor is for test purpose and queries localhost for index.html only once on port 8080
HTTPClient(java.lang.String strHost, int iPort, Stats st)
          this constructor accepts host as String as well as port number as integer and Statistic reporting object Stats
HTTPClient(java.lang.String strHost, java.lang.String resource, java.lang.String action, int iPort, java.lang.String message, Stats st, int iRepeats, int iTimeOutSec)
          This is the main constructor Parameters: String Hostname like "www.yourHost.com"
String recource like index.html, default.htm, jsp/myJSP.jsp
String action either GET or POST
int iPort like 80, 8080, 12345
String message this is the parameter list like user=Edwin&password=Secret
Stats st reporting object see Stats class documentation
int Repeats number of times message is exchanged in one client
int iTimeOutSec timeout in seconds the client will wait for response
HTTPClient extends the Thread.
 
Method Summary
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

c

public static byte[] c

c1

public static byte[] c1

LF

public static final java.lang.String LF

CRLF

public static final java.lang.String CRLF
Cariage Return LineFeed as String


SPACE

public static final java.lang.String SPACE
Constructor Detail

HTTPClient

public HTTPClient(Stats st)
Creates new HTTPClient Generally the constructor establishes the connection and designates the input and output streams and sets up all the neccessary information in addition builds the HTTP requests texts as well this constructor is for test purpose and queries localhost for index.html only once on port 8080


HTTPClient

public HTTPClient(java.lang.String strHost,
                  int iPort,
                  Stats st)
this constructor accepts host as String as well as port number as integer and Statistic reporting object Stats


HTTPClient

public HTTPClient(java.lang.String strHost,
                  java.lang.String resource,
                  java.lang.String action,
                  int iPort,
                  java.lang.String message,
                  Stats st,
                  int iRepeats,
                  int iTimeOutSec)
This is the main constructor Parameters: String Hostname like "www.yourHost.com"
String recource like index.html, default.htm, jsp/myJSP.jsp
String action either GET or POST
int iPort like 80, 8080, 12345
String message this is the parameter list like user=Edwin&password=Secret
Stats st reporting object see Stats class documentation
int Repeats number of times message is exchanged in one client
int iTimeOutSec timeout in seconds the client will wait for response
HTTPClient extends the Thread.

Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread