Schnittstelle StorageAdapterRegistry


public interface StorageAdapterRegistry
An interface that allows to register and query storage adapters.
  • Methodendetails

    • getStorageAdapter

      StorageAdapter getStorageAdapter(StorageAdapterId id) throws de.esoco.storage.StorageException
      Returns the registered storage adapter for a StorageAdapterId.
      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

      default StorageAdapter getStorageAdapter(String id) throws de.esoco.storage.StorageException
      Returns the registered storage adapter for the string representation of a storage adapter ID as created by StorageAdapterId.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 certain StorageAdapter 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