Class HttpTaskServerClient

java.lang.Object
com.alibaba.ageiport.processor.core.client.http.HttpTaskServerClient
All Implemented Interfaces:
com.alibaba.ageiport.processor.core.spi.client.TaskServerClient

public class HttpTaskServerClient extends Object implements com.alibaba.ageiport.processor.core.spi.client.TaskServerClient
Author:
lingyi
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final okhttp3.MediaType
     
    static com.alibaba.ageiport.common.logger.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    HttpTaskServerClient(com.alibaba.ageiport.processor.core.AgeiPort ageiPort, com.alibaba.ageiport.processor.core.client.http.HttpTaskServerClientOptions options)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    createMainTask(com.alibaba.ageiport.processor.core.spi.client.CreateMainTaskRequest createMainTaskRequest)
     
    createSubTask(com.alibaba.ageiport.processor.core.spi.client.CreateSubTasksRequest createSubTasksRequest)
     
    createTaskSpecification(com.alibaba.ageiport.processor.core.spi.client.CreateSpecificationRequest createSpecificationRequest)
     
    com.alibaba.ageiport.processor.core.model.core.impl.MainTask
    getMainTask(String mainTaskId)
     
    <T extends com.alibaba.ageiport.sdk.core.Response>
    T
    getResponse(com.alibaba.ageiport.sdk.core.Request<T> request)
     
    com.alibaba.ageiport.processor.core.model.core.impl.SubTask
    getSubTask(String subTaskId)
     
    com.alibaba.ageiport.processor.core.model.core.impl.TaskSpecification
     
    retryRequest(okhttp3.Request httpRequest)
     
    void
    updateMainTask(com.alibaba.ageiport.processor.core.model.core.impl.MainTask mainTask)
     
    void
    updateSubTask(com.alibaba.ageiport.processor.core.model.core.impl.SubTask subTask)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOGGER

      public static com.alibaba.ageiport.common.logger.Logger LOGGER
    • JSON

      public static final okhttp3.MediaType JSON
  • Constructor Details

    • HttpTaskServerClient

      public HttpTaskServerClient(com.alibaba.ageiport.processor.core.AgeiPort ageiPort, com.alibaba.ageiport.processor.core.client.http.HttpTaskServerClientOptions options)
  • Method Details

    • createMainTask

      public String createMainTask(com.alibaba.ageiport.processor.core.spi.client.CreateMainTaskRequest createMainTaskRequest)
      Specified by:
      createMainTask in interface com.alibaba.ageiport.processor.core.spi.client.TaskServerClient
    • updateMainTask

      public void updateMainTask(com.alibaba.ageiport.processor.core.model.core.impl.MainTask mainTask)
      Specified by:
      updateMainTask in interface com.alibaba.ageiport.processor.core.spi.client.TaskServerClient
    • getMainTask

      public com.alibaba.ageiport.processor.core.model.core.impl.MainTask getMainTask(String mainTaskId)
      Specified by:
      getMainTask in interface com.alibaba.ageiport.processor.core.spi.client.TaskServerClient
    • createSubTask

      public List<String> createSubTask(com.alibaba.ageiport.processor.core.spi.client.CreateSubTasksRequest createSubTasksRequest)
      Specified by:
      createSubTask in interface com.alibaba.ageiport.processor.core.spi.client.TaskServerClient
    • updateSubTask

      public void updateSubTask(com.alibaba.ageiport.processor.core.model.core.impl.SubTask subTask)
      Specified by:
      updateSubTask in interface com.alibaba.ageiport.processor.core.spi.client.TaskServerClient
    • getSubTask

      public com.alibaba.ageiport.processor.core.model.core.impl.SubTask getSubTask(String subTaskId)
      Specified by:
      getSubTask in interface com.alibaba.ageiport.processor.core.spi.client.TaskServerClient
    • getTaskSpecification

      public com.alibaba.ageiport.processor.core.model.core.impl.TaskSpecification getTaskSpecification(String taskCode)
      Specified by:
      getTaskSpecification in interface com.alibaba.ageiport.processor.core.spi.client.TaskServerClient
    • createTaskSpecification

      public String createTaskSpecification(com.alibaba.ageiport.processor.core.spi.client.CreateSpecificationRequest createSpecificationRequest)
      Specified by:
      createTaskSpecification in interface com.alibaba.ageiport.processor.core.spi.client.TaskServerClient
    • getResponse

      public <T extends com.alibaba.ageiport.sdk.core.Response> T getResponse(com.alibaba.ageiport.sdk.core.Request<T> request)
    • retryRequest

      public String retryRequest(okhttp3.Request httpRequest) throws IOException
      Throws:
      IOException