Apache JMeter
2.0.1.20050615

org.apache.jmeter.protocol.http.proxy
Class HttpRequestHdr

java.lang.Object
  extended byorg.apache.jmeter.protocol.http.proxy.HttpRequestHdr

public class HttpRequestHdr
extends Object

The headers of the client HTTP request.

Version:
$Revision: 1.23.2.2 $

Nested Class Summary
static class HttpRequestHdr.Test
           
 
Field Summary
 String method
          Http Request method.
 String postData
           
 String url
          The requested url.
 String version
          Version of http being used.
 
Constructor Summary
HttpRequestHdr()
           
 
Method Summary
 String getContentType()
           
 HeaderManager getHeaderManager()
           
 HTTPSampler getSampler()
           
static MultipartUrlConfig isMultipart(String contentType)
           
 byte[] parse(InputStream in)
          Parses a http header from a stream.
 void parseFirstLine(String firstLine)
           
 int parseLine(String nextLine)
           
 String serverName()
          Find the //server.name from an url.
 int serverPort()
          Find the :PORT form http://server.ect:PORT/some/file.xxx
 String serverUrl()
          Find the /some/file.xxxx form http://server.ect:PORT/some/file.xxx
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

method

public String method
Http Request method. Such as get or post.


url

public String url
The requested url. The universal resource locator that hopefully uniquely describes the object or service the client is requesting.


version

public String version
Version of http being used. Such as HTTP/1.0.


postData

public String postData
Constructor Detail

HttpRequestHdr

public HttpRequestHdr()
Method Detail

parse

public byte[] parse(InputStream in)
             throws IOException
Parses a http header from a stream.

Parameters:
in - the stream to parse.
Returns:
array of bytes from client.
Throws:
IOException

parseFirstLine

public void parseFirstLine(String firstLine)

parseLine

public int parseLine(String nextLine)

getHeaderManager

public HeaderManager getHeaderManager()

getSampler

public HTTPSampler getSampler()
                       throws MalformedURLException,
                              IOException,
                              ProtocolException
Throws:
MalformedURLException
IOException
ProtocolException

getContentType

public String getContentType()

isMultipart

public static MultipartUrlConfig isMultipart(String contentType)

serverName

public String serverName()
Find the //server.name from an url.

Returns:
server's internet name

serverPort

public int serverPort()
Find the :PORT form http://server.ect:PORT/some/file.xxx

Returns:
server's port

serverUrl

public String serverUrl()
Find the /some/file.xxxx form http://server.ect:PORT/some/file.xxx

Returns:
the deproxied url

Apache JMeter
2.0.1.20050615

Copyright © 1998-2005 Apache Software Foundation. All Rights Reserved.