|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--webtester.packages.apps.httpProxyGUI
Provides a GUI interface for the http proxy.
Field Summary | |
private static java.net.ServerSocket |
acceptor
The socket which listens for browser connections. |
private static boolean |
bEndProxy
Indicates whether the proxy has finished recording. |
private static boolean |
bFirst
Indiciates whether this is the first testcase which has been recorded. |
private static boolean |
bPostRedirect
Indicates whether a POST request sent a redirec request. |
private static boolean |
bRecord
Indicates whether the proxy is currently recording. |
private static java.util.HashMap |
hServerTypes
Contains server type information. |
private static int |
iDefaultPort
The default port on which to listen for browser connections. |
private static int |
iDividerLocation
Divider location for the split pane. |
private static int |
iMaxTries
Maximum number of times the application will try to read data from the browser input streams. |
private static int |
iSleepTime
The amount of time to sleep while waiting for a thread to execute. |
private static int |
iTextAreaCols
The number of columns in the text area. |
private static int |
iTextAreaRows
The number of rows in the text area. |
private static int |
iTextFieldLen
Default length of a text field. |
private static int |
iTextFieldLen2
Default length for other text fields. |
private static int |
iTextLength
Length at which the text area is cleared. |
private static javax.swing.JLabel |
label
Label used to provide instructions to user. |
private static java.lang.String |
sExcludeFile
Name of file which contains regexes to exclude from tokenized HTML. |
private static java.lang.String |
sName
The test case name. |
private static java.lang.String |
sPathSeparator
The path separator for the OS executing the application. |
private static javax.swing.JTextArea |
text
Text area used to display information to the user. |
private static javax.swing.JTextField |
textField
Text field for user to enter a test case name. |
private static javax.swing.tree.DefaultMutableTreeNode |
top
The top node of the tree. |
private static javax.swing.JTree |
tree
The component used to display the tree to the user. |
private static javax.swing.tree.DefaultTreeModel |
treeModel
The tree model used to dynamically modify the tree. |
Constructor Summary | |
httpProxyGUI()
|
Method Summary | |
private static java.lang.String |
getHttpHeaders(java.io.InputStream in,
java.io.OutputStream out)
Retrieve http headers from the browsers' streams. |
private static java.lang.String |
getURL(java.lang.String sStr)
Parse the request headers into a hashmap. |
static void |
main(java.lang.String[] argv)
The main method, the entry point into the application. |
private static boolean |
normalProxy(java.lang.String sURL,
boolean bVal)
Determine if the normal proxy should be used. |
private static void |
processClientRequest(java.net.Socket client,
boolean bVal)
Call the thread which processes the requests. |
private static void |
updateTree()
Update the JTree which appears on the right side of the screen to display a list of all recorded URLs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static javax.swing.tree.DefaultTreeModel treeModel
private static javax.swing.tree.DefaultMutableTreeNode top
private static javax.swing.JTree tree
private static final int iTextAreaRows
private static final int iTextAreaCols
private static final javax.swing.JTextArea text
private static final int iTextFieldLen
private static final int iTextFieldLen2
private static final javax.swing.JTextField textField
private static final javax.swing.JLabel label
private static java.net.ServerSocket acceptor
private static boolean bRecord
private static boolean bEndProxy
private static java.util.HashMap hServerTypes
private static boolean bFirst
private static boolean bPostRedirect
private static java.lang.String sName
private static java.lang.String sExcludeFile
private static java.lang.String sPathSeparator
private static final int iSleepTime
private static final int iDividerLocation
private static final int iDefaultPort
private static final int iTextLength
private static final int iMaxTries
Constructor Detail |
public httpProxyGUI()
Method Detail |
public static void main(java.lang.String[] argv)
argv
- command-line argumentsprivate static void updateTree()
private static java.lang.String getHttpHeaders(java.io.InputStream in, java.io.OutputStream out)
in
- the input stream from the browserout
- the output stream from the browser
private static java.lang.String getURL(java.lang.String sStr)
sStr
- the header data represented as a String
private static boolean normalProxy(java.lang.String sURL, boolean bVal)
sURL
- the URL parsed from HTTP headersbVal
- indicates if images are being recorded
private static void processClientRequest(java.net.Socket client, boolean bVal) throws java.io.IOException
client
- the client socket, i.e. the connection to the browserbVal
- indicates whether images are being recorded
java.io.IOException
- if a socket error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |