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

com.catchpoint.trace.integrations.elasticsearch.intercept.ElasticsearchInterceptor Maven / Gradle / Ivy

There is a newer version: 0.0.20
Show newest version
package com.catchpoint.trace.integrations.elasticsearch.intercept;

/**
 * Interface for interceptors to be invoked for Elasticsearch request events.
 *
 * @author serkan
 */
public interface ElasticsearchInterceptor {

    /**
     * Invoked before command is executed.
     *
     * @param uri       the URI (path) to send the request
     * @param method    HTTP method to send the request
     * @param body      body the request
     */
    void onBeforeRequest(String uri, String method, String body);

    /**
     * Invoked after request.
     *
     * @param uri       the URI (path) to send the request
     * @param method    HTTP method to send the request
     * @param body      body the request
     */
    void onAfterRequest(String uri, String method, String body);

    /**
     * Invoked when there is an error while request.
     *
     * @param uri       the URI (path) to send the request
     * @param method    HTTP method to send the request
     * @param body      body the request
     * @param error     the {@link Throwable error} occurred while request
     */
    void onErrorRequest(String uri, String method, String body, Throwable error);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy