io.sentry.servlet.SentryServletContainerInitializer Maven / Gradle / Ivy
package io.sentry.servlet;
import com.jakewharton.nopen.annotation.Open;
import java.util.Set;
import javax.servlet.ServletContainerInitializer;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Servlet container initializer used to add the {@link SentryServletRequestListener} to the {@link
* ServletContext}.
*/
@Open
public class SentryServletContainerInitializer implements ServletContainerInitializer {
@Override
public void onStartup(@Nullable Set> c, @NotNull ServletContext ctx)
throws ServletException {
ctx.addListener(SentryServletRequestListener.class);
}
}