Class AsyncResource
- java.lang.Object
-
- org.apache.tika.server.core.resource.AsyncResource
-
@Path("/async") public class AsyncResource extends Object
-
-
Constructor Summary
Constructors Constructor Description AsyncResource(Path tikaConfigPath, Set<String> supportedFetchers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayBlockingQueue<org.apache.tika.pipes.emitter.EmitData>getEmitDataQueue(int size)ArrayBlockingQueue<org.apache.tika.pipes.FetchEmitTuple>getFetchEmitQueue(int queueSize)Map<String,Object>post(InputStream is, jakarta.ws.rs.core.HttpHeaders httpHeaders, jakarta.ws.rs.core.UriInfo info)The client posts a json request.voidshutdownNow()
-
-
-
Constructor Detail
-
AsyncResource
public AsyncResource(Path tikaConfigPath, Set<String> supportedFetchers) throws org.apache.tika.exception.TikaException, IOException, SAXException
- Throws:
org.apache.tika.exception.TikaExceptionIOExceptionSAXException
-
-
Method Detail
-
getFetchEmitQueue
public ArrayBlockingQueue<org.apache.tika.pipes.FetchEmitTuple> getFetchEmitQueue(int queueSize)
-
getEmitDataQueue
public ArrayBlockingQueue<org.apache.tika.pipes.emitter.EmitData> getEmitDataQueue(int size)
-
post
@POST @Produces("application/json") public Map<String,Object> post(InputStream is, @Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @Context jakarta.ws.rs.core.UriInfo info) throws ExceptionThe client posts a json request. At a minimum, this must be a json object that contains an emitter and a fetcherString key with the key to fetch the inputStream. Optionally, it may contain a metadata object that will be used to populate the metadata key for pass through of metadata from the client.The extracted text content is stored with the key
TikaCoreProperties.TIKA_CONTENTMust specify a fetcherString and an emitter in the posted json.
- Parameters:
info- uri info- Returns:
- InputStream that can be deserialized as a list of
Metadataobjects - Throws:
Exception
-
-