Class AbstractMockClient
java.lang.Object
fr.gouv.vitam.common.external.client.AbstractMockClient
- All Implemented Interfaces:
MockOrRestClient,VitamAutoCloseable,AutoCloseable
- Direct Known Subclasses:
AdminExternalClientMock
Abstract Mock common client
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFake Inbound Response for Mock client support -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCheck the status from the servicevoidcheckStatus(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 certificatevoidclose()Close the underneath http clientvoidconsumeAnyEntityAndClose(javax.ws.rs.core.Response response) Helper when an error occurs on client usage side to consume response howeverGet the resource path of the server.Get the service URL
-
Constructor Details
-
AbstractMockClient
public AbstractMockClient()
-
-
Method Details
-
checkStatus
public void checkStatus()Description copied from interface:MockOrRestClientCheck the status from the service- Specified by:
checkStatusin interfaceMockOrRestClient
-
checkStatus
public void checkStatus(javax.ws.rs.core.MultivaluedHashMap<String, Object> headers) throws VitamApplicationServerExceptionDescription copied from interface:MockOrRestClientCheck the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificate- Specified by:
checkStatusin interfaceMockOrRestClient- Throws:
VitamApplicationServerException- if the Server is unavailable
-
close
public void close()Description copied from interface:MockOrRestClientClose the underneath http client- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceMockOrRestClient- Specified by:
closein interfaceVitamAutoCloseable
-
getResourcePath
Description copied from interface:MockOrRestClientGet the resource path of the server.- Specified by:
getResourcePathin interfaceMockOrRestClient- Returns:
- the resource path as string
-
getServiceUrl
Description copied from interface:MockOrRestClientGet the service URL- Specified by:
getServiceUrlin interfaceMockOrRestClient- Returns:
- the service URL
-
consumeAnyEntityAndClose
public void consumeAnyEntityAndClose(javax.ws.rs.core.Response response) Description copied from interface:MockOrRestClientHelper when an error occurs on client usage side to consume response however- Specified by:
consumeAnyEntityAndClosein interfaceMockOrRestClient
-