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

com.cybermkd.route.config.InterceptorLoader Maven / Gradle / Ivy

package com.cybermkd.route.config;


import com.cybermkd.route.interceptor.Interceptor;

import java.util.ArrayList;
import java.util.List;

/**
 * The interceptors applied to all actions.
 */
final public class InterceptorLoader {

    private final List interceptorList = new ArrayList();

    public InterceptorLoader add(Interceptor interceptor) {
        if (interceptor != null)
            this.interceptorList.add(interceptor);
        return this;
    }

    public Interceptor[] getInterceptorArray() {
        Interceptor[] result = interceptorList.toArray(new Interceptor[interceptorList.size()]);
        return result;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy