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

it.bz.opendatahub.alpinebits.middleware.Middleware Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

package it.bz.opendatahub.alpinebits.middleware;

/**
 * The middleware implements a certain aspect or functionality.
 */
public interface Middleware {

    /**
     * Handle the invocation, using the given {@link Context} if appropriate. Call
     * {@link MiddlewareChain#next()} to invoke the next middleware in the chain.
     *
     * @param ctx   The {@link Context} is shared between all middlewares of the chain
     * @param chain the chain is used to call the next middleware when appropriate
     */
    void handleContext(Context ctx, MiddlewareChain chain);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy