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

org.rootservices.otter.router.entity.Location Maven / Gradle / Ivy

package org.rootservices.otter.router.entity;


import org.rootservices.otter.controller.entity.StatusCode;
import org.rootservices.otter.controller.entity.mime.MimeType;
import org.rootservices.otter.dispatch.RouteRunner;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;


/**
 * The target entity to match a http request to.
 */
public class Location {
    private Pattern pattern;
    private List contentTypes;
    private RouteRunner routeRunner;
    private Map errorRouteRunners = new HashMap<>();

    public Location(Pattern pattern, List contentTypes, RouteRunner routeRunner, Map errorRouteRunners) {
        this.pattern = pattern;
        this.contentTypes = contentTypes;
        this.routeRunner = routeRunner;
        this.errorRouteRunners = errorRouteRunners;
    }

    public Pattern getPattern() {
        return pattern;
    }

    public void setPattern(Pattern pattern) {
        this.pattern = pattern;
    }

    public List getContentTypes() {
        return contentTypes;
    }

    public void setContentTypes(List contentTypes) {
        this.contentTypes = contentTypes;
    }

    public RouteRunner getRouteRunner() {
        return routeRunner;
    }

    public void setRouteRunner(RouteRunner routeRunner) {
        this.routeRunner = routeRunner;
    }

    public Map getErrorRouteRunners() {
        return errorRouteRunners;
    }

    public void setErrorRouteRunners(Map errorRouteRunners) {
        this.errorRouteRunners = errorRouteRunners;
    }

    @Override
    public String toString() {
        return pattern.toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy