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

com.thoughtworks.inproctester.resteasy.HostAndPortRouteMatcher Maven / Gradle / Ivy

There is a newer version: 1.0.15
Show newest version
package com.thoughtworks.inproctester.resteasy;

import java.net.URI;

public class HostAndPortRouteMatcher implements RouteMatcher {
    private String hostname;
    private int port;

    public HostAndPortRouteMatcher(String hostname, int port) {
        this.hostname = hostname;
        this.port = port;
    }

    @Override
    public boolean routeMatches(URI requestUri) {
        return hostname.equalsIgnoreCase(requestUri.getHost()) && port == requestUri.getPort();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy