Class AsyncResource

java.lang.Object
org.apache.tika.server.core.resource.AsyncResource

@Path("/async") public class AsyncResource extends Object
  • Constructor Details

  • Method Details

    • setMaxQueuePauseMillis

      public void setMaxQueuePauseMillis(long maxQueuePauseMillis)
      How long a full /async queue blocks a POST before returning 429; see TikaServerConfig.
    • getFetchEmitQueue

      public ArrayBlockingQueue<FetchEmitTuple> getFetchEmitQueue(int queueSize)
    • getEmitDataQueue

      public ArrayBlockingQueue<EmitDataImpl> getEmitDataQueue(int size)
    • post

      @POST @Produces("application/json") public jakarta.ws.rs.core.Response post(InputStream is, @Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @Context jakarta.ws.rs.core.UriInfo info) throws Exception
      The client posts a JSON object {"tuples":[...]}. Each tuple names a fetcher and fetch key for input and an emitter for output; it may also carry a metadata object (passed through to the emitted metadata) and a parse context.

      The extracted text content is stored with the key TikaCoreProperties.TIKA_CONTENT

      Parameters:
      info - uri info
      Returns:
      JSON body reporting acceptance ({"status":"ok","added":n}); the parses themselves run asynchronously
      Throws:
      Exception
    • shutdownNow

      public void shutdownNow() throws Exception
      Throws:
      Exception