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 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. -
Constructor Summary
ConstructorsConstructorDescriptionPipesServer(String pipesClientId, TikaLoader tikaLoader, PipesConfig pipesConfig, Socket socket, DataInputStream in, DataOutputStream out, MetadataFilter metadataFilter, ContentHandlerFactory contentHandlerFactory, MetadataWriteLimiterFactory metadataWriteLimiterFactory) -
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:
-
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:
-
-
Constructor Details
-
PipesServer
public PipesServer(String pipesClientId, TikaLoader tikaLoader, PipesConfig pipesConfig, Socket socket, DataInputStream in, DataOutputStream out, MetadataFilter metadataFilter, ContentHandlerFactory contentHandlerFactory, MetadataWriteLimiterFactory metadataWriteLimiterFactory) throws TikaConfigException, IOException - Throws:
TikaConfigExceptionIOException
-
-
Method Details
-
load
- Throws:
Exception
-
main
-
mainLoop
public void mainLoop() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
initializeResources
- Throws:
TikaExceptionIOExceptionSAXException
-