public class DefaultResponseLocator extends Object implements ResponseLocator, AutoCloseable
Modifier and Type | Class and Description |
---|---|
static class |
DefaultResponseLocator.Model |
static class |
DefaultResponseLocator.RequestModel |
static class |
DefaultResponseLocator.ResponseModel |
Constructor and Description |
---|
DefaultResponseLocator(String prefix,
String test) |
Modifier and Type | Method and Description |
---|---|
void |
addModel(DefaultResponseLocator.Model model) |
void |
close() |
protected boolean |
doesHeadersMatch(Request request,
DefaultResponseLocator.RequestModel model,
Predicate<String> headerFilter) |
protected Optional<Response> |
doFind(Request request,
String pref,
ClassLoader loader,
Predicate<String> headerFilter,
boolean exactMatching) |
Optional<Response> |
findMatching(Request request,
Predicate<String> headerFilter) |
void |
flush(String baseCapture) |
protected byte[] |
getPayload(DefaultResponseLocator.Model model) |
protected boolean |
matches(Request request,
DefaultResponseLocator.RequestModel model,
boolean exact,
Predicate<String> headerFilter) |
public static final String PREFIX
public DefaultResponseLocator(String prefix, String test)
public Optional<Response> findMatching(Request request, Predicate<String> headerFilter)
findMatching
in interface ResponseLocator
protected Optional<Response> doFind(Request request, String pref, ClassLoader loader, Predicate<String> headerFilter, boolean exactMatching)
protected byte[] getPayload(DefaultResponseLocator.Model model)
protected boolean matches(Request request, DefaultResponseLocator.RequestModel model, boolean exact, Predicate<String> headerFilter)
protected boolean doesHeadersMatch(Request request, DefaultResponseLocator.RequestModel model, Predicate<String> headerFilter)
public void close()
close
in interface AutoCloseable
public void addModel(DefaultResponseLocator.Model model)
1.1.16-SNAPSHOT - Copyright © 2018 Talend Component Kit Documentation