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 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() |
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() |
boolean |
hasConfigFile() |
boolean |
isEnableUnsecureFeatures() |
boolean |
isNoFork() |
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 |
setLogLevel(String level) |
void |
setMaxFiles(long maxFiles) |
void |
setMaxforkedStartupMillis(long maxforkedStartupMillis) |
void |
setMaxForkedStartupMillis(long maxForkedStartupMillis) |
void |
setMaxRestarts(int maxRestarts) |
void |
setPort(String port) |
void |
setReturnStackTrace(boolean returnStackTrace) |
void |
setTaskPulseMillis(long taskPulseMillis) |
void |
setTaskTimeoutMillis(long taskTimeoutMillis) |
buildComposite, buildComposite, 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_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 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 String getIdBase()
public String getJavaPath()
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 String getId()
public int getNumRestarts()
public String getForkedStatusFile()
public void setMaxforkedStartupMillis(long maxforkedStartupMillis)
public int[] getPorts()
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.