Class PipesServer
java.lang.Object
org.apache.tika.pipes.core.server.PipesServer
- All Implemented Interfaces:
AutoCloseable
This server is forked from the PipesClient. This class isolates
parsing from the client to protect the primary JVM.
When configuring logging for this class, make absolutely certain not to write to STDOUT. This class uses STDOUT to communicate with the PipesClient.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intIdle self-exit (no request within socketTimeoutMillis).static final intExit code used when the child self-terminates because its parent JVM disappeared.static final StringEnv var the parent manager sets so the child can watch the parent's process handle and exit promptly if the parent dies.static final Stringstatic final StringPrefixes of the temp dirs the parent creates for forks; a fork deletes only a dir so named. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidstatic PipesServerstatic voidvoidmainLoop()
-
Field Details
-
AUTH_TOKEN_LENGTH_BYTES
public static final int AUTH_TOKEN_LENGTH_BYTES- See Also:
-
PARENT_PID_ENV
Env var the parent manager sets so the child can watch the parent's process handle and exit promptly if the parent dies.- See Also:
-
TEMP_DIR_PREFIX
Prefixes of the temp dirs the parent creates for forks; a fork deletes only a dir so named.- See Also:
-
SHARED_TEMP_DIR_PREFIX
- See Also:
-
PARENT_GONE_EXIT_CODE
public static final int PARENT_GONE_EXIT_CODEExit code used when the child self-terminates because its parent JVM disappeared. Distinct from UNSPECIFIED_CRASH (19) so log readers can tell the difference between "I crashed" and "my parent went away".- See Also:
-
IDLE_EXIT_CODE
public static final int IDLE_EXIT_CODEIdle self-exit (no request within socketTimeoutMillis). Not 0: that means a parent-requested SHUT_DOWN. Other codes:PipesMessageType.getExitCode().- See Also:
-
-
Method Details
-
load
- Throws:
Exception
-
main
- Throws:
Exception
-
mainLoop
public void mainLoop() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
initializeResources
- Throws:
TikaExceptionIOExceptionSAXException
-