All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.newrelic.agent.security.instrumentator.httpclient.EventAbortPolicy Maven / Gradle / Ivy

Go to download

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());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy