com.github.dreamhead.moco.HttpRequestExtractor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of moco-core Show documentation
Show all versions of moco-core Show documentation
Moco is an easy setup stub framework, mainly focusing on testing and integration.
package com.github.dreamhead.moco;
import com.google.common.base.Optional;
public abstract class HttpRequestExtractor implements RequestExtractor {
protected abstract Optional doExtract(final HttpRequest request);
public Optional extract(final Request request) {
if (HttpRequest.class.isInstance(request)) {
return doExtract(HttpRequest.class.cast(request));
}
return Optional.absent();
}
}