Class PostConnectorRestart
java.lang.Object
org.sourcelab.kafka.connect.apiclient.request.post.PostConnectorRestart
- All Implemented Interfaces:
PostRequest<Boolean>,Request<Boolean>
Defines a request to restart a connector.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe name of the API end point to issue a request against.Object to be submitted as the body of the request.parseResponse(String responseStr) Parse the rest service's response into a concrete object.withIncludeTasks(boolean includeTasks) Only available from Kafka Connect version 3.0.0 and up.withOnlyFailed(boolean onlyFailed) Only available from Kafka Connect version 3.0.0 and up.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.sourcelab.kafka.connect.apiclient.request.post.PostRequest
getRequestMethod
-
Constructor Details
-
PostConnectorRestart
Constructor.- Parameters:
connectorName- Name of connector to restart
-
-
Method Details
-
withIncludeTasks
Only available from Kafka Connect version 3.0.0 and up.- Parameters:
includeTasks- Specifies whether to restart the connector instance and task instances (includeTasks=true`) or just the connector instance (includeTasks=false).- Returns:
- self reference for method chaining.
-
withOnlyFailed
Only available from Kafka Connect version 3.0.0 and up.- Parameters:
onlyFailed- specifies whether to restart just the instances with a FAILED status (onlyFailed=true) or all instances (onlyFailed=false).- Returns:
- self reference for method chaining.
-
getApiEndpoint
Description copied from interface:RequestThe name of the API end point to issue a request against. This is appended to the API Hostname.- Specified by:
getApiEndpointin interfaceRequest<Boolean>- Returns:
- The name of the end point this request uses.
-
getRequestBody
Description copied from interface:RequestObject to be submitted as the body of the request. It will be serialized to JSON using Jackson.- Specified by:
getRequestBodyin interfaceRequest<Boolean>- Returns:
- Object representing request body content.
-
parseResponse
Description copied from interface:RequestParse the rest service's response into a concrete object.- Specified by:
parseResponsein interfaceRequest<Boolean>- Parameters:
responseStr- The servers response in string format.- Returns:
- A concrete object representing the result.
- Throws:
IOException- on parsing errors.
-