Class PostConnectorTaskRestart

java.lang.Object
org.sourcelab.kafka.connect.apiclient.request.post.PostConnectorTaskRestart
All Implemented Interfaces:
PostRequest<Boolean>, Request<Boolean>

public final class PostConnectorTaskRestart extends Object implements PostRequest<Boolean>
Defines request to restart a connector's task.
  • Constructor Details

    • PostConnectorTaskRestart

      public PostConnectorTaskRestart(String connectorName, int taskId)
      Constructor.
      Parameters:
      connectorName - Name of connector.
      taskId - Id of the task.
  • Method Details

    • getApiEndpoint

      public String getApiEndpoint()
      Description copied from interface: Request
      The name of the API end point to issue a request against. This is appended to the API Hostname.
      Specified by:
      getApiEndpoint in interface Request<Boolean>
      Returns:
      The name of the end point this request uses.
    • getRequestBody

      public Object getRequestBody()
      Description copied from interface: Request
      Object to be submitted as the body of the request. It will be serialized to JSON using Jackson.
      Specified by:
      getRequestBody in interface Request<Boolean>
      Returns:
      Object representing request body content.
    • parseResponse

      public Boolean parseResponse(String responseStr) throws IOException
      Description copied from interface: Request
      Parse the rest service's response into a concrete object.
      Specified by:
      parseResponse in interface Request<Boolean>
      Parameters:
      responseStr - The servers response in string format.
      Returns:
      A concrete object representing the result.
      Throws:
      IOException - on parsing errors.