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

com.slack.api.bolt.handler.Handler Maven / Gradle / Ivy

There is a newer version: 1.44.2
Show newest version
package com.slack.api.bolt.handler;

import com.slack.api.bolt.context.Context;
import com.slack.api.bolt.request.Request;
import com.slack.api.bolt.response.Response;
import com.slack.api.methods.SlackApiException;

import java.io.IOException;

/**
 * Slack App Handler.
 *
 * @param   context
 * @param   request
 * @param  response
 */
@FunctionalInterface
public interface Handler<
        CTX extends Context,
        REQ extends Request,
        RESP extends Response> {

    /**
     * A function returns a response corresponding to the given request and its context.
     *
     * @param req     request
     * @param context context
     * @return response
     * @throws IOException
     * @throws SlackApiException
     */
    RESP apply(REQ req, CTX context) throws IOException, SlackApiException;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy