com.appland.appmap.output.v1.HttpServerRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appmap-agent Show documentation
Show all versions of appmap-agent Show documentation
Inspect and record the execution of Java for use with App Land
package com.appland.appmap.output.v1;
import java.util.Map;
import com.alibaba.fastjson.annotation.JSONField;
/**
* Represents a snapshot of an HTTP server request handled at runtime. Embedded within an
* {@link Event}.
* @see Event
* @see GitHub: AppMap - HTTP server request attributes
*/
public class HttpServerRequest {
public String protocol;
@JSONField(name = "request_method")
public String method;
@JSONField(name = "path_info")
public String path;
@JSONField(name = "normalized_path_info")
public String normalizedPath;
@JSONField
public Map headers;
/**
* Set the protocol of this request.
* @param protocol The request protocol
* @return {@code this}
* @see GitHub: AppMap - HTTP server request attributes
*/
public HttpServerRequest setProtocol(String protocol) {
this.protocol = protocol;
return this;
}
/**
* Set the method of this request.
* @param method The request method
* @return {@code this}
* @see GitHub: AppMap - HTTP server request attributes
*/
public HttpServerRequest setMethod(String method) {
this.method = method;
return this;
}
/**
* Set the path of this request.
* @param path The URI path requested
* @return {@code this}
* @see GitHub: AppMap - HTTP server request attributes
*/
public HttpServerRequest setPath(String path) {
this.path = path;
return this;
}
/**
* Set the normalized path for this request.
*/
public HttpServerRequest setNormalizedPath(String path) {
this.normalizedPath = path;
return this;
}
/**
* Set the headers of this request.
*/
public HttpServerRequest setHeaders(Map headers) {
this.headers = headers;
return this;
}
}