Class TempResourceURIGenerator


  • public final class TempResourceURIGenerator
    extends java.lang.Object
    Creates a URI for any temporary resource used within XGC.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.atomic.AtomicLong counter  
      private java.lang.String tempURIPrefix  
      static java.lang.String TMP_SCHEME  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.net.URI generate()
      Generate a unique URI for a temporary resource
      private java.lang.String getUniqueId()  
      static boolean isTempURI​(java.net.URI uri)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • tempURIPrefix

        private final java.lang.String tempURIPrefix
      • counter

        private final java.util.concurrent.atomic.AtomicLong counter
    • Constructor Detail

      • TempResourceURIGenerator

        public TempResourceURIGenerator​(java.lang.String uriPrefix)
        Parameters:
        uriPrefix - a prefix used to name the unique URI
    • Method Detail

      • generate

        public java.net.URI generate()
        Generate a unique URI for a temporary resource
        Returns:
        the URI
      • getUniqueId

        private java.lang.String getUniqueId()
      • isTempURI

        public static boolean isTempURI​(java.net.URI uri)