Package fr.gouv.vitam.common.client
Interface MockOrRestClient
-
- All Superinterfaces:
java.lang.AutoCloseable
,VitamAutoCloseable
- All Known Subinterfaces:
AccessExternalClient
,AccessExternalClientV2
,AccessInternalClient
,AdminClient
,AdminClient
,AdminExternalClient
,AdminManagementClient
,BasicClient
,BasicClient
,BatchReportClient
,CollectClient
,IngestExternalClient
,IngestInternalClient
,InternalSecurityClient
,LogbookLifeCyclesClient
,LogbookOperationsClient
,MetaDataClient
,ProcessingManagementClient
,SiegfriedClient
,StorageClient
,WorkerClient
- All Known Implementing Classes:
AbstractConnection
,AbstractMockClient
,AbstractMockClient
,AdminExternalClientMock
,AdminExternalClientRest
,AdminManagementClientMock
,BatchReportClientRest
,CollectClientMock
,CollectClientRest
,ConnectionImpl
,DefaultAdminClient
,DefaultAdminClient
,DefaultClient
,DefaultClient
,FakeDriverImpl.FakeConnectionImpl
,IhmRecetteClient
,IngestInternalClientMock
,InternalSecurityClientRest
,LogbookOperationsClientMock
,MetaDataClientMock
,MetaDataClientRest
,ProcessingManagementClientMock
,SiegfriedClientRest
,StorageClientMock
,VitamRestTestClient
,VitamRestTestClient
,WorkspaceClient
public interface MockOrRestClient extends VitamAutoCloseable
Basic client api for vitam client either in Mock or Rest mode
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
checkStatus()
Check the status from the servicevoid
checkStatus(javax.ws.rs.core.MultivaluedHashMap<java.lang.String,java.lang.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 howeverjava.lang.String
getResourcePath()
Get the resource path of the server.java.lang.String
getServiceUrl()
Get the service URL
-
-
-
Method Detail
-
getResourcePath
java.lang.String getResourcePath()
Get the resource path of the server.- Returns:
- the resource path as string
-
getServiceUrl
java.lang.String getServiceUrl()
Get the service URL- Returns:
- the service URL
-
checkStatus
void checkStatus() throws VitamApplicationServerException
Check the status from the service- Throws:
VitamApplicationServerException
- if the Server is unavailable
-
checkStatus
void checkStatus(javax.ws.rs.core.MultivaluedHashMap<java.lang.String,java.lang.Object> headers) throws VitamApplicationServerException
Check 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 interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceVitamAutoCloseable
-
-