Class PipesClient

java.lang.Object
org.apache.tika.pipes.core.PipesClient
All Implemented Interfaces:
Closeable, AutoCloseable

public class PipesClient extends Object implements Closeable
The PipesClient is designed to be single-threaded. It only allots a single thread for process(FetchEmitTuple) processing. See AsyncProcessor for handling multiple PipesClients.

PipesClient delegates server lifecycle management to a ServerManager. In per-client mode, each client has its own PerClientServerManager. In shared mode, all clients share a single SharedServerManager.

  • Field Details

  • Constructor Details

    • PipesClient

      public PipesClient(PipesConfig pipesConfig, ServerManager serverManager)
      Creates a PipesClient with the given server manager.

      The caller retains ownership of the server manager and is responsible for closing it. This is used in shared mode where multiple clients share a single server manager.

      Parameters:
      pipesConfig - the pipes configuration
      serverManager - the server manager (per-client or shared)
    • PipesClient

      public PipesClient(PipesConfig pipesConfig, Path tikaConfigPath)
      Creates a PipesClient with its own dedicated server process.

      This is a convenience constructor for per-client mode that creates a PerClientServerManager internally. The server will be started lazily on first use and shut down when this client is closed.

      Parameters:
      pipesConfig - the pipes configuration
      tikaConfigPath - path to the tika config file
  • Method Details