public class DigipostApiMock extends Object implements io.undertow.server.HttpHandler
Modifier and Type | Class and Description |
---|---|
static class |
DigipostApiMock.ContentPart |
static class |
DigipostApiMock.DigipostRequest |
static class |
DigipostApiMock.Method |
static class |
DigipostApiMock.MockRequest |
static class |
DigipostApiMock.MockResponse |
class |
DigipostApiMock.MultipartRequestMatcher |
static interface |
DigipostApiMock.RequestMatcher |
static class |
DigipostApiMock.RequestsAndResponses |
static interface |
DigipostApiMock.ResponseProducer |
Modifier and Type | Field and Description |
---|---|
org.apache.http.client.methods.CloseableHttpResponse |
defaultResponse |
Constructor and Description |
---|
DigipostApiMock() |
DigipostApiMock(Clock clock) |
Modifier and Type | Method and Description |
---|---|
List<DigipostApiMock.ContentPart> |
getContentparts(String multipartString) |
static org.apache.http.client.methods.CloseableHttpResponse |
getDefaultResponse(Clock clock) |
void |
handleRequest(io.undertow.server.HttpServerExchange httpContext) |
void |
init() |
DigipostApiMock |
start(int port,
Map<DigipostApiMock.Method,DigipostApiMock.RequestsAndResponses> requestsAndResponsesMap,
KeyPair keyPair) |
void |
stop() |
public final org.apache.http.client.methods.CloseableHttpResponse defaultResponse
public DigipostApiMock()
public DigipostApiMock(Clock clock)
public void handleRequest(io.undertow.server.HttpServerExchange httpContext) throws Exception
handleRequest
in interface io.undertow.server.HttpHandler
Exception
public DigipostApiMock start(int port, Map<DigipostApiMock.Method,DigipostApiMock.RequestsAndResponses> requestsAndResponsesMap, KeyPair keyPair)
public void stop()
public void init()
public List<DigipostApiMock.ContentPart> getContentparts(String multipartString)
public static org.apache.http.client.methods.CloseableHttpResponse getDefaultResponse(Clock clock)
Copyright © 2017 Digipost. All rights reserved.