Class StorageClientFactory
- java.lang.Object
-
- fr.gouv.vitam.common.client.VitamClientFactory<StorageClient>
-
- fr.gouv.vitam.storage.engine.client.StorageClientFactory
-
- All Implemented Interfaces:
VitamClientFactoryInterface<StorageClient>
public class StorageClientFactory extends VitamClientFactory<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 enumStorageClient. 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
Fields Modifier and Type Field Description static java.lang.StringRESOURCE_PATHDefault path-
Fields inherited from class fr.gouv.vitam.common.client.VitamClientFactory
clientConfiguration
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidchangeMode(ClientConfiguration configuration)StorageClientgetClient()Get the default storage clientstatic StorageClientFactorygetInstance()Get the StorageClientFactory instance-
Methods 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 Detail
-
RESOURCE_PATH
public static final java.lang.String RESOURCE_PATH
Default path- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static StorageClientFactory getInstance()
Get the StorageClientFactory instance- Returns:
- the instance
-
getClient
public StorageClient getClient()
Get the default storage client- Returns:
- the default storage client
-
changeMode
public static final void changeMode(ClientConfiguration configuration)
-
-