Package com.iizix.urn

Class URNFactory

  • public final class URNFactory
    extends java.lang.Object
    Factory used to keep track of various URL mapper's possible for the iizi Server and Designer, e.g. for global, user, or session private URL's. These URL's can be used e.g. to map a very large (images) stored on file or in a database so that the client gets a short URL to use, and still have to download the contents to get it (but can be kept in cache by that device). It can also used to store an image (ImageBuffer or byte data) into the server for temporary or permanent use (either as file or in database).
    Christopher Mindus
    See Also:
    URN, NID
    • Method Detail

      • getInstance

        public static URNFactory getInstance()
        Gets the instance to the URL factory.
      • register

        public boolean register​(IURNProvider provider)
        Registers a URN provider.
        provider - The provider.
        true if successfully registered, false if already registered. Failures will also be logged in the server.
        java.lang.RuntimeException - If this method is called twice for the same URN provider.
      • getProvider

        public IURNProvider getProvider​(NID nid)
        Gets the service provider for the specified name.
        nid - The NID.
        The provider, or null if not found.
      • from

        public URN from​(java.lang.String urnString)
                 throws URNException
        Creates a URN from a String.
        urnString - The String to resolve to an URN resource.
        The URN instance.
        URNException - For illegal URN's.
        NIDException - For exceptions with Naming ID's.
        UnknownNIDException - For unknown Naming ID's.
        java.lang.IllegalArgumentException - If the implementation encounters illegal characters.