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

com.github.dreamhead.moco.handler.ProxyResponseHandler Maven / Gradle / Ivy

Go to download

Moco is an easy setup stub framework, mainly focusing on testing and integration.

There is a newer version: 1.5.0
Show newest version
package com.github.dreamhead.moco.handler;

import com.github.dreamhead.moco.ResponseHandler;
import com.github.dreamhead.moco.handler.failover.Failover;
import com.google.common.base.Optional;

import java.net.URL;

import static com.google.common.base.Optional.of;

public class ProxyResponseHandler extends AbstractProxyResponseHandler implements ResponseHandler {
    private final URL url;

    public ProxyResponseHandler(final URL url, final Failover failover) {
        super(failover);
        this.url = url;
    }

    @Override
    protected Optional remoteUrl(final String uri) {
        return of(this.url.toString());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy