Interface Request<T>
- Type Parameters:
T- return type of request.
- All Known Subinterfaces:
DeleteRequest<T>,GetRequest<T>,PostRequest<T>,PutRequest<T>
- All Known Implementing Classes:
DeleteConnector,GetConnector,GetConnectorConfig,GetConnectorPlugins,GetConnectors,GetConnectorsExpandAllDetails,GetConnectorsExpandInfo,GetConnectorsExpandStatus,GetConnectorStatus,GetConnectorTasks,GetConnectorTaskStatus,GetConnectorTopics,GetConnectServerVersion,PostConnector,PostConnectorRestart,PostConnectorTaskRestart,PutConnectorConfig,PutConnectorPause,PutConnectorPluginConfigValidate,PutConnectorResume,PutConnectorTopicsReset
public interface Request<T>
Interface for all Requests to implement.
-
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.Request Method, IE POST, GET, etc..parseResponse(String responseStr) Parse the rest service's response into a concrete object.
-
Method Details
-
getApiEndpoint
String getApiEndpoint()The name of the API end point to issue a request against. This is appended to the API Hostname.- Returns:
- The name of the end point this request uses.
-
getRequestMethod
RequestMethod getRequestMethod()Request Method, IE POST, GET, etc..- Returns:
- The type of HTTP Request.
-
getRequestBody
Object getRequestBody()Object to be submitted as the body of the request. It will be serialized to JSON using Jackson.- Returns:
- Object representing request body content.
-
parseResponse
Parse the rest service's response into a concrete object.- Parameters:
responseStr- The servers response in string format.- Returns:
- A concrete object representing the result.
- Throws:
IOException- on parsing errors.
-