Skip to content

Commit

Permalink
first iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
jandro996 committed Jul 25, 2024
1 parent 598bb20 commit 2d49e09
Show file tree
Hide file tree
Showing 23 changed files with 1,336 additions and 758 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,35 +236,35 @@ public Iterator<Map.Entry<Address<?>, Object>> iterator() {

/* Interface for use of GatewayBridge */

String getScheme() {
public String getScheme() {
return scheme;
}

void setScheme(String scheme) {
public void setScheme(String scheme) {
this.scheme = scheme;
}

String getMethod() {
public String getMethod() {
return method;
}

void setMethod(String method) {
public void setMethod(String method) {
this.method = method;
}

String getSavedRawURI() {
public String getSavedRawURI() {
return savedRawURI;
}

void setRawURI(String savedRawURI) {
public void setRawURI(String savedRawURI) {
if (this.savedRawURI != null && this.savedRawURI.compareToIgnoreCase(savedRawURI) != 0) {
throw new IllegalStateException(
"Forbidden attempt to set different raw URI for given request context");
}
this.savedRawURI = savedRawURI;
}

void addRequestHeader(String name, String value) {
public void addRequestHeader(String name, String value) {
if (finishedRequestHeaders) {
throw new IllegalStateException("Request headers were said to be finished before");
}
Expand All @@ -278,19 +278,19 @@ void addRequestHeader(String name, String value) {
strings.add(value);
}

void finishRequestHeaders() {
public void finishRequestHeaders() {
this.finishedRequestHeaders = true;
}

boolean isFinishedRequestHeaders() {
public boolean isFinishedRequestHeaders() {
return finishedRequestHeaders;
}

Map<String, List<String>> getRequestHeaders() {
public Map<String, List<String>> getRequestHeaders() {
return requestHeaders;
}

void addResponseHeader(String name, String value) {
public void addResponseHeader(String name, String value) {
if (finishedResponseHeaders) {
throw new IllegalStateException("Response headers were said to be finished before");
}
Expand All @@ -312,11 +312,11 @@ public boolean isFinishedResponseHeaders() {
return finishedResponseHeaders;
}

Map<String, List<String>> getResponseHeaders() {
public Map<String, List<String>> getResponseHeaders() {
return responseHeaders;
}

void addCookies(Map<String, List<String>> cookies) {
public void addCookies(Map<String, List<String>> cookies) {
if (finishedRequestHeaders) {
throw new IllegalStateException("Request headers were said to be finished before");
}
Expand All @@ -327,15 +327,15 @@ void addCookies(Map<String, List<String>> cookies) {
}
}

Map<String, ? extends Collection<String>> getCookies() {
public Map<String, ? extends Collection<String>> getCookies() {
return collectedCookies != null ? collectedCookies : Collections.emptyMap();
}

String getPeerAddress() {
public String getPeerAddress() {
return peerAddress;
}

void setPeerAddress(String peerAddress) {
public void setPeerAddress(String peerAddress) {
this.peerAddress = peerAddress;
}

Expand All @@ -347,15 +347,15 @@ public void setPeerPort(int peerPort) {
this.peerPort = peerPort;
}

void setInferredClientIp(String ipAddress) {
public void setInferredClientIp(String ipAddress) {
this.inferredClientIp = ipAddress;
}

String getInferredClientIp() {
public String getInferredClientIp() {
return inferredClientIp;
}

void setStoredRequestBodySupplier(StoredBodySupplier storedRequestBodySupplier) {
public void setStoredRequestBodySupplier(StoredBodySupplier storedRequestBodySupplier) {
this.storedRequestBodySupplier = storedRequestBodySupplier;
}

Expand Down Expand Up @@ -467,7 +467,7 @@ public void reportStackTrace(StackTraceEvent stackTraceEvent) {
}
}

Collection<AppSecEvent> transferCollectedEvents() {
public Collection<AppSecEvent> transferCollectedEvents() {
if (this.appSecEvents == null) {
return Collections.emptyList();
}
Expand All @@ -481,7 +481,7 @@ Collection<AppSecEvent> transferCollectedEvents() {
return events;
}

StackTraceCollection transferStackTracesCollection() {
public StackTraceCollection transferStackTracesCollection() {
if (this.stackTraceEvents == null) {
return null;
}
Expand All @@ -492,7 +492,7 @@ StackTraceCollection transferStackTracesCollection() {
stackTraces.add(item);
}

if (stackTraces.size() != 0) {
if (!stackTraces.isEmpty()) {
return new StackTraceCollection(stackTraces);
} else {
return null;
Expand All @@ -509,7 +509,7 @@ public void reportApiSchemas(Map<String, String> schemas) {
}
}

boolean commitApiSchemas(TraceSegment traceSegment) {
public boolean commitApiSchemas(TraceSegment traceSegment) {
if (traceSegment == null || apiSchemas == null) {
return false;
}
Expand Down
Loading

0 comments on commit 2d49e09

Please sign in to comment.