Top Description Fields Constructors Methods
org.eclipse.jgit.junit.http

public Class AccessEvent

extends Object
Class Inheritance
Imports
java.util.Collections, .Map, .TreeMap, org.eclipse.jetty.http.HttpField, .HttpURI, org.eclipse.jetty.server.Request, .Response, org.eclipse.jetty.util.Fields

A single request made through org.eclipse.jgit.junit.http.AppServer.

Field Summary

Modifier and TypeField and Description
private final String
private final Map<String, String[]>
private final Map<String, String>
private Map<String, String>
private int
private final HttpURI

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static Map<String, String>
private static Map<String, String>
private static Map<String, String[]>
public String

Returns:

"GET" or "POST"
getMethod
()

Get the method.

public String

Returns:

first value of the request parameter; null if not sent.
getParameter
(String
name of the request parameter to read.
name
)

Get parameter

public Map<String, String[]>

Returns:

all parameters in the request.
getParameters
()

Get parameters

public String

Returns:

path of the file on the server, e.g. /git/HEAD.
getPath
()

Get path.

public String

Returns:

first value of the request header; null if not sent.
getRequestHeader
(String
name of the request header to read.
name
)

Get request header

public String

Returns:

first value of the response header; null if not sent.
getResponseHeader
(String
name of the response header to read.
name
)

Get response header.

public int

Returns:

HTTP status code of the response, e.g. 200, 403, 500.
getStatus
()

Get the status.

pack-priv void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

methodback to summary
private final String method
parametersback to summary
private final Map<String, String[]> parameters
requestHeadersback to summary
private final Map<String, String> requestHeaders
responseHeadersback to summary
private Map<String, String> responseHeaders
statusback to summary
private int status
uriback to summary
private final HttpURI uri

Constructor Detail

AccessEventback to summary
pack-priv AccessEvent(Request req)

Method Detail

cloneHeadersback to summary
private static Map<String, String> cloneHeaders(Request req)
cloneHeadersback to summary
private static Map<String, String> cloneHeaders(Response rsp)
cloneParametersback to summary
private static Map<String, String[]> cloneParameters(Request req)
getMethodback to summary
public String getMethod()

Get the method.

Returns:String

"GET" or "POST"

getParameterback to summary
public String getParameter(String name)

Get parameter

Parameters
name:String

name of the request parameter to read.

Returns:String

first value of the request parameter; null if not sent.

getParametersback to summary
public Map<String, String[]> getParameters()

Get parameters

Returns:Map<String, String[]>

all parameters in the request.

getPathback to summary
public String getPath()

Get path.

Returns:String

path of the file on the server, e.g. /git/HEAD.

getRequestHeaderback to summary
public String getRequestHeader(String name)

Get request header

Parameters
name:String

name of the request header to read.

Returns:String

first value of the request header; null if not sent.

getResponseHeaderback to summary
public String getResponseHeader(String name)

Get response header.

Parameters
name:String

name of the response header to read.

Returns:String

first value of the response header; null if not sent.

getStatusback to summary
public int getStatus()

Get the status.

Returns:int

HTTP status code of the response, e.g. 200, 403, 500.

setResponseback to summary
pack-priv void setResponse(Response rsp)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override