|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.http.server.util.ARequestHandler
org.eclipse.smila.http.server.json.JsonBulkRequestHandler
org.eclipse.smila.bulkbuilder.httphandler.BulkbuilderBurstHandler
public class BulkbuilderBurstHandler
Implements the processing of HTTP requests for the bulk processing.
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Boolean> |
_microBulkHasData
mark if records where actually pushed for a bulk. |
protected java.lang.ThreadLocal<java.lang.String> |
_microBulkId
The micro bulk id. |
protected BulkbuilderService |
_service
Reference to the BulkBuilder. |
protected java.lang.ThreadLocal<java.util.Collection<WorkflowRunInfo>> |
_workflowRunDataToReturn
The collected workflow run data data to return when calling finish. |
static java.lang.String |
KEY_WORKFLOW_RUNS
The key for the workflows in the result. |
| Fields inherited from class org.eclipse.smila.http.server.json.JsonBulkRequestHandler |
|---|
FACTORY, HTTP_UTILS |
| Constructor Summary | |
|---|---|
BulkbuilderBurstHandler()
|
|
| Method Summary | |
|---|---|
protected void |
appendIntermediateWorkflowRunInfo(WorkflowRunInfo workflowRunInfo)
appends the workflow run info to the list if the workflow run id has not already been set. |
protected java.lang.Object |
createResultObject(java.util.Collection<WorkflowRunInfo> workflowInfos)
convert collected WorkflowRunInfos to Any. |
void |
end(java.lang.String method,
java.lang.String requestUri,
HttpExchange exchange)
Called after processing and finishing is done. |
java.lang.Object |
finish(java.lang.String method,
java.lang.String requestUri,
HttpExchange exchange)
Called after the complete input bulk has been processed successfully. |
protected int |
getErrorStatus(java.lang.String method,
java.lang.String requestUri,
java.lang.Throwable ex)
Gets the HTTP error status code depending on the method, request URI and throwable. |
protected java.lang.String |
getJobName(java.lang.String requestUri)
Extracts the job name from the requestURI. |
void |
process(java.lang.String method,
java.lang.String requestUri,
Record inputRecord,
HttpExchange exchange)
process input record and return result record. |
void |
setBulkbuilderService(BulkbuilderService service)
Sets the bulk builder. |
void |
start(java.lang.String method,
java.lang.String requestUri,
HttpExchange exchange)
Called before processing. |
void |
unsetBulkbuilderService(BulkbuilderService service)
Unset the bulk builder. |
| Methods inherited from class org.eclipse.smila.http.server.json.JsonBulkRequestHandler |
|---|
getRequestHost, getSuccessStatus, handle, isValidMethod, writeErrorResult, writeResultObject, writeSuccessResult |
| Methods inherited from class org.eclipse.smila.http.server.util.ARequestHandler |
|---|
activate, getDynamicUriParts, getRootContextPath, getStaticUriParts, getUriPattern, matches, urlDecode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String KEY_WORKFLOW_RUNS
protected final java.lang.ThreadLocal<java.util.Collection<WorkflowRunInfo>> _workflowRunDataToReturn
protected final java.lang.ThreadLocal<java.lang.String> _microBulkId
protected final java.util.Map<java.lang.String,java.lang.Boolean> _microBulkHasData
protected BulkbuilderService _service
| Constructor Detail |
|---|
public BulkbuilderBurstHandler()
| Method Detail |
|---|
public void start(java.lang.String method,
java.lang.String requestUri,
HttpExchange exchange)
throws java.lang.Exception
start in class JsonBulkRequestHandlermethod - the request method.requestUri - the request URI.exchange - http exchange object, contains e.g. the http header fields
java.lang.Exception - any failure during processing.
public void process(java.lang.String method,
java.lang.String requestUri,
Record inputRecord,
HttpExchange exchange)
throws java.lang.Exception
process in class JsonBulkRequestHandlermethod - the HTTP method of this request.requestUri - the request URIinputRecord - input Record, may be nullexchange - http exchange object, contains e.g. the http header fields
java.lang.Exception - any failure during processing.
public java.lang.Object finish(java.lang.String method,
java.lang.String requestUri,
HttpExchange exchange)
throws java.lang.Exception
finish in class JsonBulkRequestHandlermethod - the request method.requestUri - the request URI.exchange - http exchange object, contains e.g. the http header fields
java.lang.Exception - any failure during finishing.
protected java.lang.Object createResultObject(java.util.Collection<WorkflowRunInfo> workflowInfos)
throws java.net.MalformedURLException
java.net.MalformedURLException
public void end(java.lang.String method,
java.lang.String requestUri,
HttpExchange exchange)
throws java.lang.Exception
end in class JsonBulkRequestHandlermethod - the request method.requestUri - the request URI.exchange - http exchange object, contains e.g. the http header fields
java.lang.Exceptionprotected void appendIntermediateWorkflowRunInfo(WorkflowRunInfo workflowRunInfo)
workflowRunInfo - protected java.lang.String getJobName(java.lang.String requestUri)
requestUri - the request URI
protected int getErrorStatus(java.lang.String method,
java.lang.String requestUri,
java.lang.Throwable ex)
getErrorStatus in class JsonBulkRequestHandlerHTTP_UTILS#getErrorStatus(Throwable)public void setBulkbuilderService(BulkbuilderService service)
service - the new BulkBuilderpublic void unsetBulkbuilderService(BulkbuilderService service)
service - the BulkBuilder to unset
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||