public class AbstractMockClient extends Object implements MockOrRestClient
Modifier and Type | Class and Description |
---|---|
static class |
AbstractMockClient.FakeInboundResponse
Fake Inbound Response for Mock client support
|
Modifier and Type | Field and Description |
---|---|
protected static String |
INTERNAL_SERVER_ERROR |
Constructor and Description |
---|
AbstractMockClient() |
Modifier and Type | Method and Description |
---|---|
void |
checkStatus()
Check the status from the service
|
void |
checkStatus(javax.ws.rs.core.MultivaluedHashMap<String,Object> headers)
Check the status from the service
used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificate
|
void |
close()
Close the underneath http client
|
void |
consumeAnyEntityAndClose(javax.ws.rs.core.Response response)
Helper when an error occurs on client usage side to consume response however
|
String |
getResourcePath()
Get the resource path of the server.
|
String |
getServiceUrl()
Get the service URL
|
protected static final String INTERNAL_SERVER_ERROR
public void checkStatus()
MockOrRestClient
checkStatus
in interface MockOrRestClient
public void checkStatus(javax.ws.rs.core.MultivaluedHashMap<String,Object> headers) throws VitamApplicationServerException
MockOrRestClient
checkStatus
in interface MockOrRestClient
VitamApplicationServerException
- if the Server is unavailablepublic void close()
MockOrRestClient
close
in interface MockOrRestClient
close
in interface VitamAutoCloseable
close
in interface AutoCloseable
public String getResourcePath()
MockOrRestClient
getResourcePath
in interface MockOrRestClient
public String getServiceUrl()
MockOrRestClient
getServiceUrl
in interface MockOrRestClient
public void consumeAnyEntityAndClose(javax.ws.rs.core.Response response)
MockOrRestClient
consumeAnyEntityAndClose
in interface MockOrRestClient
Copyright © 2018 Vitam. All rights reserved.