Class WebServerAccessLogLine

java.lang.Object
org.torproject.metrics.collector.webstats.WebServerAccessLogLine
All Implemented Interfaces:
org.torproject.descriptor.LogDescriptor.Line, org.torproject.descriptor.WebServerAccessLog.Line

public class WebServerAccessLogLine
extends java.lang.Object
implements org.torproject.descriptor.WebServerAccessLog.Line
  • Constructor Summary

    Constructors 
    Constructor Description
    WebServerAccessLogLine()  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object other)  
    java.time.LocalDate getDate()  
    java.lang.String getDateString()
    Only used internally during sanitization.
    java.lang.String getIp()  
    org.torproject.descriptor.Method getMethod()  
    java.lang.String getProtocol()  
    java.lang.String getRequest()  
    int getResponse()  
    java.util.Optional<java.lang.Integer> getSize()  
    int hashCode()  
    boolean isValid()  
    static WebServerAccessLogLine makeLine​(java.lang.String line)
    Creates a Line from a string.
    void setIp​(java.lang.String ip)
    Only used internally during sanitization.
    void setRequest​(java.lang.String request)
    Only used internally during sanitization.
    java.lang.String toLogString()
    Returns a log line string.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • toLogString

      public java.lang.String toLogString()
      Returns a log line string. Possibly empty.
      Specified by:
      toLogString in interface org.torproject.descriptor.LogDescriptor.Line
    • toString

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

      public java.lang.String getDateString()
      Only used internally during sanitization. Returns the string of the date using 'dd/MMM/yyyy' format.
    • getIp

      public java.lang.String getIp()
      Specified by:
      getIp in interface org.torproject.descriptor.WebServerAccessLog.Line
    • setIp

      public void setIp​(java.lang.String ip)
      Only used internally during sanitization.
    • getMethod

      public org.torproject.descriptor.Method getMethod()
      Specified by:
      getMethod in interface org.torproject.descriptor.WebServerAccessLog.Line
    • getProtocol

      public java.lang.String getProtocol()
      Specified by:
      getProtocol in interface org.torproject.descriptor.WebServerAccessLog.Line
    • getRequest

      public java.lang.String getRequest()
      Specified by:
      getRequest in interface org.torproject.descriptor.WebServerAccessLog.Line
    • getSize

      public java.util.Optional<java.lang.Integer> getSize()
      Specified by:
      getSize in interface org.torproject.descriptor.WebServerAccessLog.Line
    • getResponse

      public int getResponse()
      Specified by:
      getResponse in interface org.torproject.descriptor.WebServerAccessLog.Line
    • setRequest

      public void setRequest​(java.lang.String request)
      Only used internally during sanitization.
    • getDate

      public java.time.LocalDate getDate()
      Specified by:
      getDate in interface org.torproject.descriptor.WebServerAccessLog.Line
    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface org.torproject.descriptor.WebServerAccessLog.Line
    • makeLine

      public static WebServerAccessLogLine makeLine​(java.lang.String line)
      Creates a Line from a string.
    • equals

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

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