Interface IV8LibraryManager


  • public interface IV8LibraryManager
    Library manager operating on a set of connectors providing access to library sources.
    • Method Detail

      • addConnector

        void addConnector​(URI source,
                          String name)
        Adds library connector with specified source.
        Parameters:
        source - library connector source, can't be null
        name - connector name, can't be null
      • getLibrary

        IV8Library getLibrary​(IV8LibraryDescriptor libraryDescriptor)
        Returns a library by its descriptor.
        Parameters:
        libraryDescriptor - library descriptor, can't be null
        Returns:
        library
      • getLibraryDescriptors

        Map<URI,​Collection<IV8LibraryDescriptor>> getLibraryDescriptors()
        Gets cached library descriptors from all connectors. Awaits if caching requests are already performed.
        Returns:
        library descriptors associated with connectors
      • getConnectors

        Map<URI,​String> getConnectors()
        Gets connectors.
        Returns:
        connectors (source - name)
      • registerLibrary

        void registerLibrary​(IV8Library library,
                             URI destination)
        Registers library in the specified connector.
        Parameters:
        library - library to register, can't be null
        destination - connector identifier source, can't be null
      • removeConnector

        void removeConnector​(URI source)
        Removes connector from library repository manager.
        Parameters:
        source - connector identifier source
      • requestLibraryDescriptors

        Map<URI,​Collection<IV8LibraryDescriptor>> requestLibraryDescriptors()
        Requests library descriptors from all connectors.
        Returns:
        actual library descriptors associated with connectors
      • update

        void update()
        Updates cached library descriptors.