Package org.apache.tika.server.core
Class TikaServerConfig
java.lang.Object
org.apache.tika.server.core.TikaServerConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longNumber of milliseconds to wait for forked process to startupstatic final Stringstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCors()digest configuration string, e.g. md5 or sha256, alternately w 16 or 32 encoding, e.g. md5:32,sha256:16 would result in two digests per fileintgetHost()getId()intgetPort()booleanbooleanbooleanstatic TikaServerConfigload()Config with only the defaultsstatic TikaServerConfigload(org.apache.commons.cli.CommandLine commandLine) voidsetConfigPath(String path) voidvoidvoidsetDigestMarkLimit(int digestMarkLimit) voidsetEnableUnsecureFeatures(boolean enableUnsecureFeatures) voidsetEndpoints(ArrayList<String> endpoints) voidvoidvoidsetLogLevel(String level) voidsetPort(int port) voidsetReturnStackTrace(boolean returnStackTrace) voidsetTlsConfig(TlsConfig tlsConfig)
-
Field Details
-
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
-
DEFAULT_HOST
- See Also:
-
LOG_LEVELS
-
DEFAULT_FORKED_STARTUP_MILLIS
public static final long DEFAULT_FORKED_STARTUP_MILLISNumber of milliseconds to wait for forked process to startup- See Also:
-
-
Constructor Details
-
TikaServerConfig
public TikaServerConfig()
-
-
Method Details
-
load
Config with only the defaults -
load
public static TikaServerConfig load(org.apache.commons.cli.CommandLine commandLine) throws IOException, TikaException - Throws:
IOExceptionTikaException
-
getPort
public int getPort() -
setPort
public void setPort(int port) -
getIdBase
-
isEnableUnsecureFeatures
public boolean isEnableUnsecureFeatures() -
setEnableUnsecureFeatures
public void setEnableUnsecureFeatures(boolean enableUnsecureFeatures) -
getHost
-
setHost
-
getLogLevel
-
setLogLevel
- Throws:
TikaConfigException
-
getCors
- Returns:
- the origin url for cors, can be "*"
-
setCors
-
hasConfigFile
public boolean hasConfigFile() -
getConfigPath
-
setConfigPath
-
getDigestMarkLimit
public int getDigestMarkLimit() -
setDigestMarkLimit
public void setDigestMarkLimit(int digestMarkLimit) -
getDigest
digest configuration string, e.g. md5 or sha256, alternately w 16 or 32 encoding, e.g. md5:32,sha256:16 would result in two digests per file- Returns:
-
setDigest
-
isReturnStackTrace
public boolean isReturnStackTrace() -
setReturnStackTrace
public void setReturnStackTrace(boolean returnStackTrace) -
getTlsConfig
-
setTlsConfig
-
getEndpoints
-
setEndpoints
-
getId
-
setId
-