Class Source


  • public class Source
    extends java.lang.Object
    Represents the source for the logging configuration.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.File file
      Captures a URI or File.
      private java.lang.String location  
      private java.net.URI uri  
    • Constructor Summary

      Constructors 
      Constructor Description
      Source​(java.io.File file)
      Constructs a new Source with the specified file.
      Source​(java.net.URI uri, long lastModified)
      Constructs a new Source from the specified URI.
      Source​(ConfigurationSource source)
      Constructs a Source from a ConfigurationSource.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.io.File getFile()
      Returns the file configuration source, or null if this configuration source is based on an URL or has neither a file nor an URL.
      java.lang.String getLocation()
      Returns a string describing the configuration source file or URL, or null if this configuration source has neither a file nor an URL.
      java.net.URI getURI()
      Returns the configuration source URL, or null if this configuration source is based on a file or has neither a file nor an URL.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • file

        private final java.io.File file
        Captures a URI or File.
      • uri

        private final java.net.URI uri
      • location

        private final java.lang.String location
    • Constructor Detail

      • Source

        public Source​(ConfigurationSource source)
        Constructs a Source from a ConfigurationSource.
        Parameters:
        source - The ConfigurationSource.
      • Source

        public Source​(java.io.File file)
        Constructs a new Source with the specified file. file.
        Parameters:
        file - the file where the input stream originated
      • Source

        public Source​(java.net.URI uri,
                      long lastModified)
        Constructs a new Source from the specified URI.
        Parameters:
        uri - the URL where the input stream originated
    • Method Detail

      • getFile

        public java.io.File getFile()
        Returns the file configuration source, or null if this configuration source is based on an URL or has neither a file nor an URL.
        Returns:
        the configuration source file, or null
      • getURI

        public java.net.URI getURI()
        Returns the configuration source URL, or null if this configuration source is based on a file or has neither a file nor an URL.
        Returns:
        the configuration source URL, or null
      • getLocation

        public java.lang.String getLocation()
        Returns a string describing the configuration source file or URL, or null if this configuration source has neither a file nor an URL.
        Returns:
        a string describing the configuration source file or URL, or null
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object