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()booleanbooleanWhether callers may supply per-request parser configuration (the/configendpoints and the multipartconfigpart).booleanWhether the pipes/fetch endpoints (pipes,async) may be enabled.booleanstatic TikaServerConfigload()Config with only the defaultsstatic TikaServerConfigload(org.apache.commons.cli.CommandLine commandLine) voidsetAllowPerRequestConfig(boolean allowPerRequestConfig) voidsetAllowPipes(boolean allowPipes) voidsetConfigPath(String path) voidvoidvoidsetDigestMarkLimit(int digestMarkLimit) 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
-
isAllowPipes
public boolean isAllowPipes()Whether the pipes/fetch endpoints (pipes,async) may be enabled. Off by default; selecting one of those endpoints without this set causes the server to refuse to start. -
setAllowPipes
public void setAllowPipes(boolean allowPipes) -
isAllowPerRequestConfig
public boolean isAllowPerRequestConfig()Whether callers may supply per-request parser configuration (the/configendpoints and the multipartconfigpart). Off by default; when off, such requests are rejected with 403. -
setAllowPerRequestConfig
public void setAllowPerRequestConfig(boolean allowPerRequestConfig) -
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
-