Package org.languagetool.server
Class ServerTools
java.lang.Object
org.languagetool.server.ServerTools
- Since:
- 3.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate static final Pattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcleanUserTextFromMessage(String s, Map<String, String> params) Remove user-content from message in case parameters require increased privacy.(package private) static StringgetHttpReferrer(HttpExchange httpExchange) (package private) static StringgetHttpUserAgent(HttpExchange httpExchange) (package private) static JLanguageTool.Level(package private) static StringgetLoggingInfo(String remoteAddress, Exception e, int errorCode, HttpExchange httpExchange, Map<String, String> params, long runtimeMillis, RequestCounter reqCounter) (package private) static JLanguageTool.Mode(package private) static String(package private) static StringgetSQLDateString(Calendar date) (package private) static StringgetSQLDatetimeString(Calendar date) (package private) static UserLimitsgetUserLimits(Map<String, String> params, HTTPServerConfig config) (package private) static void(package private) static voidprint(String s, PrintStream outputStream) (package private) static voidsetAllowOrigin(HttpExchange httpExchange, String allowOriginUrl) (package private) static voidsetCommonHeaders(HttpExchange httpExchange, String contentType, String allowOriginUrl) (package private) static booleansiteMatches(String referrer, String blockedRef)
-
Field Details
-
sentContentPattern
-
logger
private static final org.slf4j.Logger logger
-
-
Constructor Details
-
ServerTools
private ServerTools()
-
-
Method Details
-
getLoggingInfo
@NotNull static String getLoggingInfo(String remoteAddress, Exception e, int errorCode, HttpExchange httpExchange, Map<String, String> params, long runtimeMillis, RequestCounter reqCounter) -
getHttpUserAgent
-
getHttpReferrer
-
getSQLDatetimeString
-
getSQLDateString
-
print
-
print
-
setCommonHeaders
-
setAllowOrigin
-
getUserLimits
-
getMode
-
getModeForLog
-
getLevel
-
cleanUserTextFromMessage
Remove user-content from message in case parameters require increased privacy.- Since:
- 5.0
-
siteMatches
-