sun.net.www.http
public Class HttpCapture
extends Object
- Class Inheritance
-
- Imports
- java.io.*, java.util.ArrayList, java.util.regex.*, sun.net.NetProperties, sun.util.logging.PlatformLogger
Main class of the HTTP traffic capture tool.
Captures are triggered by the sun.net.http.captureRules system property.
If set, it should point to a file containing the capture rules.
Format for the file is simple:
- 1 rule per line
- Lines starting with a # are considered comments and ignored
- a rule is a pair of a regular expression and file pattern, separated by a comma
- The regular expression is applied to URLs, if it matches, the traffic for
that URL will be captured in the associated file.
- if the file name contains a '%d', then that sequence will be replaced by a
unique random number for each URL. This allow for multi-threaded captures
of URLs matching the same pattern.
- Rules are checked in sequence, in the same order as in the file, until a
match is found or the end of the list is reached.
Examples of rules:
www\.sun\.com , sun%d.log
yahoo\.com\/.*asf , yahoo.log
- Author
- jccollet
Constructor Summary
| Access | Constructor and Description
|
|---|
| private |
|
Method Detail
| isInitialized | back to summary
|
|---|
| private static synchronized boolean isInitialized()
|