Package de.esoco.data.storage
Schnittstelle StorageAdapterRegistry
public interface StorageAdapterRegistry
An interface that allows to register and query storage adapters.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the registered storage adapter for aStorageAdapterId
.default StorageAdapter
Returns the registered storage adapter for the string representation of a storage adapter ID as created byStorageAdapterId.toString()
.registerStorageAdapter
(StorageAdapter adapter) Registers a certainStorageAdapter
instance in the current user's session and associates it with a unique string ID.
-
Methodendetails
-
getStorageAdapter
Returns the registered storage adapter for aStorageAdapterId
.- Parameter:
id
- The adapter ID- Gibt zurück:
- The storage adapter that has been registered for the given ID or NULL for none
- Löst aus:
de.esoco.storage.StorageException
- If retrieving the storage adapter fails
-
getStorageAdapter
Returns the registered storage adapter for the string representation of a storage adapter ID as created byStorageAdapterId.toString()
.- Parameter:
id
- The adapter ID- Gibt zurück:
- The storage adapter that has been registered for the given ID or NULL for none
- Löst aus:
de.esoco.storage.StorageException
- If retrieving the storage adapter fails
-
registerStorageAdapter
StorageAdapterId registerStorageAdapter(StorageAdapter adapter) throws de.esoco.storage.StorageException Registers a certainStorageAdapter
instance in the current user's session and associates it with a unique string ID. Either a reference to the returned ID or to the adapter must be kept by the invoking party because the adapter will be garbage collected if neither the ID nor the adapter are referenced any longer by any strong reference.- Parameter:
adapter
- The adapter to register- Gibt zurück:
- The ID that identifies the adapter
- Löst aus:
de.esoco.storage.StorageException
- If registering the adapter fails
-