Class ControllerTransport
java.lang.Object
com.linkedin.venice.controllerapi.ControllerTransport
- All Implemented Interfaces:
AutoCloseable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
<T extends ControllerResponse>
TexecuteGet
(String controllerUrl, String path, QueryParams params, Class<T> responseType) <T extends ControllerResponse>
TexecuteGet
(String controllerUrl, String path, QueryParams params, Class<T> responseType, int timeoutMs) <T extends ControllerResponse>
TexecutePost
(String controllerUrl, String path, QueryParams params, Class<T> responseType) <T extends ControllerResponse>
TexecutePost
(String controllerUrl, String path, QueryParams params, Class<T> responseType, int timeoutMs) <T extends ControllerResponse>
TexecutePost
(String controllerUrl, String path, QueryParams params, Class<T> responseType, int timeoutMs, byte[] data) This method shoves the POST string query params into the URL so the body will only contain the byte array data to make processing/deserializing easier.protected <T extends ControllerResponse>
TexecuteRequest
(org.apache.http.client.methods.HttpRequestBase request, Class<T> responseType, int timeoutMs) <T extends ControllerResponse>
Trequest
(String controllerUrl, ControllerRoute route, QueryParams params, Class<T> responseType) <T extends ControllerResponse>
Trequest
(String controllerUrl, ControllerRoute route, QueryParams params, Class<T> responseType, int timeoutMs, byte[] data)
-
Constructor Details
-
ControllerTransport
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
request
public <T extends ControllerResponse> T request(String controllerUrl, ControllerRoute route, QueryParams params, Class<T> responseType) throws ExecutionException, TimeoutException - Throws:
ExecutionException
TimeoutException
-
request
public <T extends ControllerResponse> T request(String controllerUrl, ControllerRoute route, QueryParams params, Class<T> responseType, int timeoutMs, byte[] data) throws ExecutionException, TimeoutException - Throws:
ExecutionException
TimeoutException
-
executeGet
public <T extends ControllerResponse> T executeGet(String controllerUrl, String path, QueryParams params, Class<T> responseType) throws ExecutionException, TimeoutException - Throws:
ExecutionException
TimeoutException
-
executeGet
public <T extends ControllerResponse> T executeGet(String controllerUrl, String path, QueryParams params, Class<T> responseType, int timeoutMs) throws ExecutionException, TimeoutException - Throws:
ExecutionException
TimeoutException
-
executePost
public <T extends ControllerResponse> T executePost(String controllerUrl, String path, QueryParams params, Class<T> responseType) throws ExecutionException, TimeoutException - Throws:
ExecutionException
TimeoutException
-
executePost
public <T extends ControllerResponse> T executePost(String controllerUrl, String path, QueryParams params, Class<T> responseType, int timeoutMs) throws ExecutionException, TimeoutException - Throws:
ExecutionException
TimeoutException
-
executePost
public <T extends ControllerResponse> T executePost(String controllerUrl, String path, QueryParams params, Class<T> responseType, int timeoutMs, byte[] data) throws TimeoutException, ExecutionException This method shoves the POST string query params into the URL so the body will only contain the byte array data to make processing/deserializing easier. Please make sure the query params doesn't exceed the URL limit of 2048 chars.- Throws:
TimeoutException
ExecutionException
-
executeRequest
protected <T extends ControllerResponse> T executeRequest(org.apache.http.client.methods.HttpRequestBase request, Class<T> responseType, int timeoutMs) throws ExecutionException, TimeoutException - Throws:
ExecutionException
TimeoutException
-