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

io.opentelemetry.javaagent.instrumentation.tomcat.common.TomcatServletEntityProvider Maven / Gradle / Ivy

/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package io.opentelemetry.javaagent.instrumentation.tomcat.common;

import org.apache.coyote.Request;
import org.apache.coyote.Response;

/**
 * Used to access servlet request/response classes from their Apache Coyote counterparts. As the
 * Coyote classes are the same for all Tomcat versions, but newer Tomcat uses jakarta.servlet
 * instead of javax.servlet, this allows accessing the servlet entities without unchecked casts in
 * shared code where HttpServletRequest and/or HttpServletResponse are used as generic parameters.
 *
 * @param  HttpServletRequest instance
 * @param  HttpServletResponse instance
 */
public interface TomcatServletEntityProvider {
  REQUEST getServletRequest(Request request);

  RESPONSE getServletResponse(Response response);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy