Package com.mindee.http
Class MindeeApi
- java.lang.Object
-
- com.mindee.http.MindeeApi
-
- Direct Known Subclasses:
MindeeHttpApi
public abstract class MindeeApi extends Object
Defines required methods for an API.
-
-
Constructor Summary
Constructors Constructor Description MindeeApi()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract <DocT extends Inference>
AsyncPredictResponse<DocT>documentQueueGet(Class<DocT> documentClass, Endpoint endpoint, String jobId)
Get a document from the predict queue.abstract <DocT extends Inference>
WorkflowResponse<DocT>executeWorkflowPost(Class<DocT> documentClass, String workflowId, RequestParameters requestParameters)
protected String
getUserAgent()
protected boolean
is2xxStatusCode(int statusCode)
abstract <DocT extends Inference>
AsyncPredictResponse<DocT>predictAsyncPost(Class<DocT> documentClass, Endpoint endpoint, RequestParameters requestParameters)
Send a file to the prediction queue.abstract <DocT extends Inference>
PredictResponse<DocT>predictPost(Class<DocT> documentClass, Endpoint endpoint, RequestParameters requestParameters)
Send a file to the prediction API.protected String
readRawResponse(org.apache.http.HttpEntity responseEntity)
-
-
-
Method Detail
-
documentQueueGet
public abstract <DocT extends Inference> AsyncPredictResponse<DocT> documentQueueGet(Class<DocT> documentClass, Endpoint endpoint, String jobId)
Get a document from the predict queue.
-
predictAsyncPost
public abstract <DocT extends Inference> AsyncPredictResponse<DocT> predictAsyncPost(Class<DocT> documentClass, Endpoint endpoint, RequestParameters requestParameters) throws IOException
Send a file to the prediction queue.- Throws:
IOException
-
predictPost
public abstract <DocT extends Inference> PredictResponse<DocT> predictPost(Class<DocT> documentClass, Endpoint endpoint, RequestParameters requestParameters) throws IOException
Send a file to the prediction API.- Throws:
IOException
-
executeWorkflowPost
public abstract <DocT extends Inference> WorkflowResponse<DocT> executeWorkflowPost(Class<DocT> documentClass, String workflowId, RequestParameters requestParameters) throws IOException
- Throws:
IOException
-
getUserAgent
protected String getUserAgent()
-
is2xxStatusCode
protected boolean is2xxStatusCode(int statusCode)
-
readRawResponse
protected String readRawResponse(org.apache.http.HttpEntity responseEntity) throws IOException
- Throws:
IOException
-
-