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()
-
Constructor Details
-
WebServerAccessLogLine
public WebServerAccessLogLine()
-
-
Method Details
-
toLogString
public java.lang.String toLogString()Returns a log line string. Possibly empty.- Specified by:
toLogString
in interfaceorg.torproject.descriptor.LogDescriptor.Line
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.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 interfaceorg.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 interfaceorg.torproject.descriptor.WebServerAccessLog.Line
-
getProtocol
public java.lang.String getProtocol()- Specified by:
getProtocol
in interfaceorg.torproject.descriptor.WebServerAccessLog.Line
-
getRequest
public java.lang.String getRequest()- Specified by:
getRequest
in interfaceorg.torproject.descriptor.WebServerAccessLog.Line
-
getSize
public java.util.Optional<java.lang.Integer> getSize()- Specified by:
getSize
in interfaceorg.torproject.descriptor.WebServerAccessLog.Line
-
getResponse
public int getResponse()- Specified by:
getResponse
in interfaceorg.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 interfaceorg.torproject.descriptor.WebServerAccessLog.Line
-
isValid
public boolean isValid()- Specified by:
isValid
in interfaceorg.torproject.descriptor.WebServerAccessLog.Line
-
makeLine
Creates a Line from a string. -
equals
public boolean equals(java.lang.Object other)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-