Skip to content

Commit

Permalink
Partial implementation for #109. Thanks to @justinsteven.
Browse files Browse the repository at this point in the history
  • Loading branch information
CoreyD97 committed Oct 26, 2023
1 parent f6970e4 commit 4ae99b7
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ private void updateRequestWithResponse(Integer entryIdentifier, Date arrivalTime
if (entriesPendingProcessing.containsKey(entryIdentifier)) {
//Not yet started processing the entry, we can add the response so it is processed in the first pass
final LogEntry logEntry = entriesPendingProcessing.get(entryIdentifier);

if (response instanceof InterceptedResponse) {
// Raises java.lang.UnsupportedOperationException: Not yet implemented
// logEntry.setClientIP(String.valueOf(((InterceptedResponse) response).sourceIpAddress()));
logEntry.setListenerInterface(((InterceptedResponse) response).listenerInterface());
}

//Update the response with the new one, and tell it when it arrived.
logEntry.addResponse(response, arrivalTime);

Expand Down Expand Up @@ -330,6 +337,12 @@ private RunnableFuture<LogEntry> createEntryUpdateRunnable(final Future<LogEntry
}

//Request was processed successfully... now process the response.
if (requestResponse instanceof InterceptedResponse) {
// Raises java.lang.UnsupportedOperationException: Not yet implemented
// logEntry.setClientIP(String.valueOf(((InterceptedResponse) requestResponse).sourceIpAddress()));
logEntry.setListenerInterface(((InterceptedResponse) requestResponse).listenerInterface());
}

logEntry.addResponse(requestResponse, arrivalTime);
LogEntry updatedEntry = processEntry(logEntry);

Expand Down

0 comments on commit 4ae99b7

Please sign in to comment.