com.newrelic.agent.security.instrumentator.httpclient.EventAbortPolicy 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.instrumentator.httpclient;
import com.newrelic.agent.security.AgentInfo;
import com.newrelic.agent.security.intcodeagent.filelogging.FileLoggerThreadPool;
import com.newrelic.api.agent.security.utils.logging.LogLevel;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;
public class EventAbortPolicy implements RejectedExecutionHandler {
private static final FileLoggerThreadPool logger = FileLoggerThreadPool.getInstance();
public EventAbortPolicy() {
AgentInfo.getInstance().getJaHealthCheck().getIastReplayRequest().incrementReplayRequestRejected();
}
public void rejectedExecution(Runnable r, ThreadPoolExecutor e) {
logger.log(LogLevel.WARNING, "Fuzz request " + r.toString() + " rejected from " + e.toString(), EventAbortPolicy.class.getName());
}
}