com.newrelic.agent.security.intcodeagent.apache.httpclient.ReplayResponseLoggingInterceptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of newrelic-security-agent Show documentation
Show all versions of newrelic-security-agent Show documentation
The New Relic Security Java agent module for full-stack security. To be used in newrelic-java-agent only.
The newest version!
package com.newrelic.agent.security.intcodeagent.apache.httpclient;
import com.newrelic.agent.security.intcodeagent.filelogging.FileLoggerThreadPool;
import com.newrelic.api.agent.security.utils.logging.LogLevel;
import org.apache.http.*;
import org.apache.http.protocol.HttpContext;
import java.io.IOException;
public class ReplayResponseLoggingInterceptor implements HttpResponseInterceptor {
private static final FileLoggerThreadPool logger = FileLoggerThreadPool.getInstance();
@Override
public void process(HttpResponse httpResponse, HttpContext httpContext) throws HttpException, IOException {
logger.log(LogLevel.FINEST, String.format("Response of the replay request %s", httpResponse.getStatusLine()), IastHttpClient.class.getName());
IastHttpClient.getInstance().setConnected(httpResponse.getStatusLine().getStatusCode() != 503 && httpResponse.getStatusLine().getStatusCode() != 504);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy