Class StorageClientFactory
java.lang.Object
fr.gouv.vitam.common.client.VitamClientFactory<StorageClient>
fr.gouv.vitam.storage.engine.client.StorageClientFactory
- All Implemented Interfaces:
VitamClientFactoryInterface<StorageClient>
StorageClient factory
Use to get a storage client in function of its type. Example :
{ @code // Retrieve default storage client StorageClient client = StorageClientFactory.getInstance().getStorageClient(); // Exists client.exists(tenantId, strategyId); }You can change the type of the client to get. The types are define into the enum
StorageClient
. Use the changeDefaultClientType method to
change the client type.-
Nested Class Summary
Nested classes/interfaces inherited from interface fr.gouv.vitam.common.client.VitamClientFactoryInterface
VitamClientFactoryInterface.VitamClientType
-
Field Summary
FieldsFields inherited from class fr.gouv.vitam.common.client.VitamClientFactory
clientConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionstatic final void
changeMode
(ClientConfiguration configuration) This method returns the correct Client adapted to the business casestatic StorageClientFactory
Get the StorageClientFactory instancestatic StorageClientFactory
getInstance
(WorkFlowExecutionContext executionContext) Get the StorageClientFactory instance for the given workflow execution contextMethods inherited from class fr.gouv.vitam.common.client.VitamClientFactory
changeResourcePath, changeServerPort, disableUseAuthorizationFilter, enableUseAuthorizationFilter, getClientConfiguration, getDefaultConfigCient, getDefaultConfigCient, getHttpClient, getHttpClient, getResourcePath, getServiceUrl, getVitamClientType, getVitamThreadPoolExecutor, initialisation, isAllowGzipDecoded, isAllowGzipEncoded, resetConnections, resume, setGzipdecoded, setGzipEncoded, setVitamClientType, shutdown, toString
-
Field Details
-
RESOURCE_PATH
Default path- See Also:
-
-
Method Details
-
getInstance
Get the StorageClientFactory instance- Returns:
- the instance
-
getInstance
Get the StorageClientFactory instance for the given workflow execution context- Parameters:
executionContext
- the workflow execution context- Returns:
- the instance
-
getClient
Description copied from interface:VitamClientFactoryInterface
This method returns the correct Client adapted to the business case- Returns:
- the Vitam client
-
changeMode
-