Package fr.gouv.vitam.common.client
Class AbstractMockClient
java.lang.Object
fr.gouv.vitam.common.client.AbstractMockClient
- All Implemented Interfaces:
MockOrRestClient
,VitamAutoCloseable
,AutoCloseable
- Direct Known Subclasses:
AdminManagementClientMock
,IngestInternalClientMock
,LogbookOperationsClientMock
,MetaDataClientMock
,ProcessingManagementClientMock
,StorageClientMock
Abstract Mock common client
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fake Inbound Response for Mock client support -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Check the status from the servicevoid
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 certificatevoid
close()
Close the underneath http clientvoid
consumeAnyEntityAndClose
(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:MockOrRestClient
Check the status from the service- Specified by:
checkStatus
in interfaceMockOrRestClient
-
checkStatus
public void checkStatus(javax.ws.rs.core.MultivaluedHashMap<String, Object> headers) throws VitamApplicationServerExceptionDescription copied from interface:MockOrRestClient
Check the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificate- Specified by:
checkStatus
in interfaceMockOrRestClient
- Throws:
VitamApplicationServerException
- if the Server is unavailable
-
close
public void close()Description copied from interface:MockOrRestClient
Close the underneath http client- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceMockOrRestClient
- Specified by:
close
in interfaceVitamAutoCloseable
-
getResourcePath
Description copied from interface:MockOrRestClient
Get the resource path of the server.- Specified by:
getResourcePath
in interfaceMockOrRestClient
- Returns:
- the resource path as string
-
getServiceUrl
Description copied from interface:MockOrRestClient
Get the service URL- Specified by:
getServiceUrl
in interfaceMockOrRestClient
- Returns:
- the service URL
-
consumeAnyEntityAndClose
public void consumeAnyEntityAndClose(javax.ws.rs.core.Response response) Description copied from interface:MockOrRestClient
Helper when an error occurs on client usage side to consume response however- Specified by:
consumeAnyEntityAndClose
in interfaceMockOrRestClient
-