Class HttpPostWorker

  • All Implemented Interfaces:
    java.lang.Runnable, Worker
    Direct Known Subclasses:
    UPDATEWorker

    public class HttpPostWorker
    extends HttpGetWorker
    HTTP Post worker. Uses HTTP posts to execute a query.

    Sends the query in plain as POST data if parameter type was not set, otherwise uses json as follows:
    {PARAMETER: QUERY}
    • Constructor Detail

      • HttpPostWorker

        public HttpPostWorker​(java.lang.String taskID,
                              Connection connection,
                              java.lang.String queriesFile,
                              @Nullable
                              java.lang.String contentType,
                              @Nullable
                              java.lang.String responseType,
                              @Nullable
                              java.lang.String parameterName,
                              @Nullable
                              java.lang.String language,
                              @Nullable
                              java.lang.Integer timeOut,
                              @Nullable
                              java.lang.Integer timeLimit,
                              @Nullable
                              java.lang.Integer fixedLatency,
                              @Nullable
                              java.lang.Integer gaussianLatency,
                              @Nullable
                              java.lang.String workerType,
                              java.lang.Integer workerID)
    • Method Detail

      • executeQuery

        public void executeQuery​(java.lang.String query,
                                 java.lang.String queryID)
        Description copied from interface: Worker
        This method executes a query and adds the results to the Result Processor for proper result and metric calculations. Note: Some of the Worker implementations employ background threads to process the result of the query. Due to this, this method does not return anything and each implementation of this method must also add the results to Result Processor within this method. This can be done by calling AbstractWorker.addResults(QueryExecutionStats)
        Specified by:
        executeQuery in interface Worker
        Overrides:
        executeQuery in class HttpGetWorker
        Parameters:
        query - The query which should be executed
        queryID - the ID of the query which should be executed