Class AsyncResource
java.lang.Object
org.apache.tika.server.core.resource.AsyncResource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEmitDataQueue(int size) getFetchEmitQueue(int queueSize) jakarta.ws.rs.core.Responsepost(InputStream is, jakarta.ws.rs.core.HttpHeaders httpHeaders, jakarta.ws.rs.core.UriInfo info) The client posts a JSON object{"tuples":[...]}.voidsetMaxQueuePauseMillis(long maxQueuePauseMillis) How long a full /async queue blocks a POST before returning 429; see TikaServerConfig.void
-
Constructor Details
-
AsyncResource
- Throws:
TikaExceptionIOExceptionSAXException
-
-
Method Details
-
setMaxQueuePauseMillis
public void setMaxQueuePauseMillis(long maxQueuePauseMillis) How long a full /async queue blocks a POST before returning 429; see TikaServerConfig. -
getFetchEmitQueue
-
getEmitDataQueue
-
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
- Throws:
Exception
-