public class TikaServerConfig extends ConfigBase
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_FORKED_STARTUP_MILLIS
Number of milliseconds to wait for forked process to startup
|
static String |
DEFAULT_HOST |
static long |
DEFAULT_MINIMUM_TIMEOUT_MILLIS
Clients may not set a timeout less than this amount.
|
static int |
DEFAULT_PORT |
static long |
DEFAULT_TASK_PULSE_MILLIS
How often to check to see that the task hasn't timed out
|
static long |
DEFAULT_TASK_TIMEOUT_MILLIS
Number of milliseconds to wait per server task (parse, detect, unpack, translate,
etc.) before timing out and shutting down the forked process.
|
static Set<String> |
LOG_LEVELS |
Constructor and Description |
---|
TikaServerConfig() |
Modifier and Type | Method and Description |
---|---|
Path |
getConfigPath() |
String |
getCors() |
String |
getDigest()
digest configuration string, e.g.
|
int |
getDigestMarkLimit() |
List<String> |
getEndpoints() |
List<String> |
getForkedJvmArgs() |
List<String> |
getForkedProcessArgs(int port,
String id) |
List<String> |
getForkedProcessArgs(String portString,
String id) |
String |
getForkedStatusFile() |
String |
getHost() |
String |
getId() |
String |
getIdBase() |
String |
getJavaPath()
full path to the java executable
|
String |
getLogLevel() |
long |
getMaxFiles()
maximum number of files before the forked server restarts.
|
long |
getMaxForkedStartupMillis()
Maximum time in millis to allow for the forked process to startup
or restart
|
int |
getMaxRestarts() |
long |
getMinimumTimeoutMillis() |
int |
getNumRestarts() |
String |
getPort() |
int[] |
getPorts() |
Set<String> |
getSupportedEmitters() |
Set<String> |
getSupportedFetchers() |
long |
getTaskPulseMillis()
How often to check to see that a task has timed out
|
long |
getTaskTimeoutMillis()
How long to wait for a task before shutting down the forked server process
and restarting it.
|
String |
getTempFilePrefix() |
TlsConfig |
getTlsConfig() |
boolean |
hasConfigFile() |
protected static List<String> |
interpolateSysProps(List<String> forkedJvmArgs) |
boolean |
isEnableUnsecureFeatures() |
boolean |
isNoFork() |
boolean |
isPreventStopMethod() |
boolean |
isReturnStackTrace() |
static TikaServerConfig |
load()
Config with only the defaults
|
static TikaServerConfig |
load(org.apache.commons.cli.CommandLine commandLine) |
void |
setConfigPath(String path) |
void |
setCors(String cors) |
void |
setDigest(String digest) |
void |
setDigestMarkLimit(int digestMarkLimit) |
void |
setEnableUnsecureFeatures(boolean enableUnsecureFeatures) |
void |
setEndpoints(List<String> endpoints) |
void |
setForkedJvmArgs(List<String> forkedJvmArgs) |
void |
setHost(String host) |
void |
setId(String id) |
void |
setJavaPath(String javaPath) |
void |
setLogLevel(String level) |
void |
setMaxFiles(long maxFiles) |
void |
setMaxforkedStartupMillis(long maxforkedStartupMillis) |
void |
setMaxForkedStartupMillis(long maxForkedStartupMillis) |
void |
setMaxRestarts(int maxRestarts) |
void |
setMinimumTimeoutMillis(long minimumTimeoutMillis) |
void |
setNoFork(boolean noFork) |
void |
setPort(String port) |
void |
setPreventStopMethod(boolean preventStopMethod) |
void |
setReturnStackTrace(boolean returnStackTrace) |
void |
setTaskPulseMillis(long taskPulseMillis) |
void |
setTaskTimeoutMillis(long taskTimeoutMillis) |
void |
setTlsConfig(TlsConfig tlsConfig) |
buildComposite, buildComposite, buildSingle, buildSingle, configure, handleSettings
public static final int DEFAULT_PORT
public static final String DEFAULT_HOST
public static final long DEFAULT_TASK_TIMEOUT_MILLIS
public static final long DEFAULT_MINIMUM_TIMEOUT_MILLIS
public static final long DEFAULT_TASK_PULSE_MILLIS
public static final long DEFAULT_FORKED_STARTUP_MILLIS
public static TikaServerConfig load()
public static TikaServerConfig load(org.apache.commons.cli.CommandLine commandLine) throws IOException, TikaException
IOException
TikaException
public boolean isNoFork()
public void setNoFork(boolean noFork)
public String getPort()
public void setPort(String port)
public long getTaskTimeoutMillis()
public void setTaskTimeoutMillis(long taskTimeoutMillis)
taskTimeoutMillis
- number of milliseconds to allow per task
(parse, detection, unzipping, etc.)public long getTaskPulseMillis()
public void setTaskPulseMillis(long taskPulseMillis)
public int getMaxRestarts()
public void setMaxRestarts(int maxRestarts)
public long getMaxForkedStartupMillis()
public void setMaxForkedStartupMillis(long maxForkedStartupMillis)
public long getMinimumTimeoutMillis()
public void setMinimumTimeoutMillis(long minimumTimeoutMillis)
public String getIdBase()
public String getJavaPath()
public void setJavaPath(String javaPath)
public String getTempFilePrefix()
public boolean isEnableUnsecureFeatures()
public void setEnableUnsecureFeatures(boolean enableUnsecureFeatures)
public String getHost()
public void setHost(String host)
public String getLogLevel()
public void setLogLevel(String level) throws TikaConfigException
TikaConfigException
public String getCors()
public void setCors(String cors)
public boolean hasConfigFile()
public Path getConfigPath()
public void setConfigPath(String path)
public int getDigestMarkLimit()
public void setDigestMarkLimit(int digestMarkLimit)
public String getDigest()
public void setDigest(String digest)
public long getMaxFiles()
public void setMaxFiles(long maxFiles)
public boolean isReturnStackTrace()
public void setReturnStackTrace(boolean returnStackTrace)
public void setTlsConfig(TlsConfig tlsConfig)
public TlsConfig getTlsConfig()
public String getId()
public void setId(String id)
public int getNumRestarts()
public String getForkedStatusFile()
public void setMaxforkedStartupMillis(long maxforkedStartupMillis)
public void setPreventStopMethod(boolean preventStopMethod)
public boolean isPreventStopMethod()
public int[] getPorts()
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.