Interface TestandtargetHttpClient
-
@ProviderType public interface TestandtargetHttpClient
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTestandtargetHttpClient.TestandtargetMethodTypeHttp method used in the API callstatic classTestandtargetHttpClient.TestandtargetSolutionSolution to be called either Target or Target Recommendations
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stringexecute(TestandtargetHttpClient.TestandtargetMethodType callMethod, TestandtargetHttpClient.TestandtargetSolution solution, TestandtargetHttpParameters parameters)Executes a request using the provided query keys and values on the configured Adobe Target API URLStringexecute(String[] queryKey, String[] queryValues)Executes a GET request with the provided query keys/values on the configured Adobe Target API URL.StringexecuteRestCall(TestandtargetCallOptions options)Executes a call against the Adobe Target REST APIStringexecuteRestCall(TestandtargetHttpClient.TestandtargetMethodType callMethod, String clientCode, String location, TestandtargetHttpClient.TestandtargetSolution solution, TestandtargetHttpParameters parameters)Executes a call against the Adobe Target REST APIStringexecuteRestGetCall(TestandtargetCallOptions options)Executes a GET request against the Adobe Target REST APIStringexecuteRestGetCall(String clientCode, String location, Map<String,String> parameters)Executes a GET request against the Adobe Target REST APIintgetConnectionTimeout()Returns the configured timeout in milliseconds until a connection is established.intgetSocketTimeout()Returns the configured timeout in milliseconds, which is the timeout for waiting for data or a maximum period of inactivity between two consecutive data packets.
-
-
-
Method Detail
-
execute
String execute(String[] queryKey, String[] queryValues) throws TestandtargetException
Executes a GET request with the provided query keys/values on the configured Adobe Target API URL.- Parameters:
queryKey- Query keysqueryValues- Query values- Returns:
- String representation of the API Response
- Throws:
TestandtargetException-TestandtargetException
-
executeRestGetCall
String executeRestGetCall(String clientCode, String location, Map<String,String> parameters) throws TestandtargetException
Executes a GET request against the Adobe Target REST API- Parameters:
clientCode- the clientCode to use, used to discover the T&T endpoint to uselocation- the location to request, for instancesegments/1.jsonparameters- query parameters- Returns:
- String representation of the API Response
- Throws:
TestandtargetException-TestandtargetException
-
executeRestGetCall
String executeRestGetCall(TestandtargetCallOptions options) throws TestandtargetException
Executes a GET request against the Adobe Target REST API- Parameters:
options- aTestandtargetCallOptionsobject containing the call options- Returns:
- String representation of the API Response
- Throws:
TestandtargetException-TestandtargetException
-
execute
String execute(TestandtargetHttpClient.TestandtargetMethodType callMethod, TestandtargetHttpClient.TestandtargetSolution solution, TestandtargetHttpParameters parameters) throws TestandtargetException
Executes a request using the provided query keys and values on the configured Adobe Target API URL- Parameters:
callMethod- - aTestandtargetHttpClient.TestandtargetMethodTypeindicating the method to be executed for the call (GET, POST, PUT or DELETE)solution- - the solution to be called, either Target or Target Recommendationsparameters- - aTestandtargetHttpParameterscontaining the call parameters- Returns:
- String representation of the API Response
- Throws:
TestandtargetException-TestandtargetException
-
executeRestCall
String executeRestCall(TestandtargetHttpClient.TestandtargetMethodType callMethod, String clientCode, String location, TestandtargetHttpClient.TestandtargetSolution solution, TestandtargetHttpParameters parameters) throws TestandtargetException
Executes a call against the Adobe Target REST API- Parameters:
callMethod- - aTestandtargetHttpClient.TestandtargetMethodTypeindicating the method to be executed for the call (GET, POST, PUT or DELETE)clientCode- the clientCode to use, used to discover the T& T endpoint to uselocation- the location to request, for instancesegments/1.jsonsolution- - the solution to be called, either Target or Target Recommendationsparameters- - aTestandtargetHttpParameterscontaining the call parameters- Returns:
- String representation of the API Response
- Throws:
TestandtargetException-TestandtargetException
-
executeRestCall
String executeRestCall(TestandtargetCallOptions options) throws TestandtargetException
Executes a call against the Adobe Target REST API- Parameters:
options- aTestandtargetCallOptionsobject containing the call options- Returns:
- a
Stringrepresentation of the API response. - Throws:
TestandtargetException-TestandtargetException
-
getConnectionTimeout
int getConnectionTimeout()
Returns the configured timeout in milliseconds until a connection is established. A timeout value of 0 is interpreted as an infinite timeout.- Returns:
- Timeout in milliseconds. If value is not configured a default timeout is returned.
-
getSocketTimeout
int getSocketTimeout()
Returns the configured timeout in milliseconds, which is the timeout for waiting for data or a maximum period of inactivity between two consecutive data packets. A timeout value of 0 is interpreted as an infinite timeout.- Returns:
- Timeout in milliseconds. If value is not configured a default timeout is returned.
-
-