Class DriverImpl
java.lang.Object
fr.gouv.vitam.storage.driver.AbstractDriver
fr.gouv.vitam.storage.offers.workspace.driver.DriverImpl
- All Implemented Interfaces:
VitamAutoCloseable,Driver,AutoCloseable
Workspace Driver Implementation
-
Field Summary
Fields inherited from class fr.gouv.vitam.storage.driver.AbstractDriver
connectionFactories -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected VitamClientFactoryInterface<? extends AbstractConnection>addInternalOfferAsFactory(StorageOffer offer, Properties parameters) This method must be implemented in the final Driver Implementation to add the ClientFactory to the driverCreate a connection to the distant offer service based on given offer Id name.static DriverImplGet the ProcessingManagementClientFactory instanceintRetrieves the driver's major version number.intRetrieves the driver's minor version number.getName()The driver implementation MUST provide a constant name which SHOULD be shared accross instances of the same driver implementation.Methods inherited from class fr.gouv.vitam.storage.driver.AbstractDriver
addOffer, close, hasOffer, isStorageOfferAvailable, removeOffer
-
Constructor Details
-
DriverImpl
public DriverImpl()Constructor
-
-
Method Details
-
getInstance
Get the ProcessingManagementClientFactory instance- Returns:
- the instance
-
addInternalOfferAsFactory
protected VitamClientFactoryInterface<? extends AbstractConnection> addInternalOfferAsFactory(StorageOffer offer, Properties parameters) Description copied from class:AbstractDriverThis method must be implemented in the final Driver Implementation to add the ClientFactory to the driver- Specified by:
addInternalOfferAsFactoryin classAbstractDriver- Returns:
- true if added
-
connect
Description copied from interface:DriverCreate a connection to the distant offer service based on given offer Id name. If no connection could be made, the driver MUST throw a StorageException- Parameters:
offerId- the offerId name- Returns:
- a connection which MUST contains all necessary parameters and initial configurations to allow further requests to the distant offer service without needing to pass parameters/configurations.
- Throws:
StorageDriverException- if any problem occurs during connection
-
getName
Description copied from interface:DriverThe driver implementation MUST provide a constant name which SHOULD be shared accross instances of the same driver implementation. Then it is strongly recommended to use a static final field in your driver implementation.This name MAY be used in user interface to provide information on the driver.
- Returns:
- The name of the driver which SHOULD be constant
-
getMajorVersion
public int getMajorVersion()Description copied from interface:DriverRetrieves the driver's major version number.This number MAY be used in user interface to provide information on the driver.
- Returns:
- this driver's major version number
-
getMinorVersion
public int getMinorVersion()Description copied from interface:DriverRetrieves the driver's minor version number.This number MAY be used in user interface to provide information on the driver.
- Returns:
- this driver's minor version number
-