Package fr.gouv.vitam.common.client
Interface MockOrRestClient
- All Superinterfaces:
AutoCloseable
,VitamAutoCloseable
- All Known Subinterfaces:
AccessExternalClient
,AccessExternalClientV2
,AccessInternalClient
,AdminClient
,AdminClient
,AdminExternalClient
,AdminManagementClient
,BasicClient
,BasicClient
,BatchReportClient
,CollectExternalClient
,CollectInternalClient
,IngestExternalClient
,IngestInternalClient
,InternalSecurityClient
,LogbookLifeCyclesClient
,LogbookOperationsClient
,MetaDataClient
,ProcessingManagementClient
,SchedulerClient
,SiegfriedClient
,StorageClient
,WorkerClient
- All Known Implementing Classes:
AbstractConnection
,AbstractMockClient
,AbstractMockClient
,AdminExternalClientMock
,AdminExternalClientRest
,AdminManagementClientMock
,BatchReportClientRest
,CollectExternalClientRest
,CollectInternalClientRest
,ConnectionImpl
,DefaultAdminClient
,DefaultAdminClient
,DefaultClient
,DefaultClient
,FakeDriverImpl.FakeConnectionImpl
,IhmRecetteClient
,IngestInternalClientMock
,InternalSecurityClientRest
,LogbookOperationsClientMock
,MetaDataClientMock
,MetaDataClientRest
,ProcessingManagementClientMock
,SiegfriedClientRest
,StorageClientMock
,VitamRestTestClient
,VitamRestTestClient
,WorkspaceClient
Basic client api for vitam client either in Mock or Rest mode
-
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
-
Method Details
-
getResourcePath
String getResourcePath()Get the resource path of the server.- Returns:
- the resource path as string
-
getServiceUrl
String getServiceUrl()Get the service URL- Returns:
- the service URL
-
checkStatus
Check the status from the service- Throws:
VitamApplicationServerException
- if the Server is unavailable
-
checkStatus
void checkStatus(javax.ws.rs.core.MultivaluedHashMap<String, Object> headers) throws VitamApplicationServerExceptionCheck the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificate- Parameters:
headers
-- Throws:
VitamApplicationServerException
- if the Server is unavailable
-
consumeAnyEntityAndClose
void consumeAnyEntityAndClose(javax.ws.rs.core.Response response) Helper when an error occurs on client usage side to consume response however- Parameters:
response
-
-
close
void close()Close the underneath http client- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceVitamAutoCloseable
-