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 java.lang.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 URLjava.lang.Stringexecute(java.lang.String[] queryKey, java.lang.String[] queryValues)Executes a GET request with the provided query keys/values on the configured Adobe Target API URL.java.lang.StringexecuteRestCall(TestandtargetCallOptions options)Executes a call against the Adobe Target REST APIjava.lang.StringexecuteRestCall(TestandtargetHttpClient.TestandtargetMethodType callMethod, java.lang.String clientCode, java.lang.String location, TestandtargetHttpClient.TestandtargetSolution solution, TestandtargetHttpParameters parameters)Executes a call against the Adobe Target REST APIjava.lang.StringexecuteRestGetCall(TestandtargetCallOptions options)Executes a GET request against the Adobe Target REST APIjava.lang.StringexecuteRestGetCall(java.lang.String clientCode, java.lang.String location, java.util.Map<java.lang.String,java.lang.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
java.lang.String execute(java.lang.String[] queryKey, java.lang.String[] queryValues) throws TestandtargetExceptionExecutes 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
java.lang.String executeRestGetCall(java.lang.String clientCode, java.lang.String location, java.util.Map<java.lang.String,java.lang.String> parameters) throws TestandtargetExceptionExecutes 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
java.lang.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
java.lang.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
java.lang.String executeRestCall(TestandtargetHttpClient.TestandtargetMethodType callMethod, java.lang.String clientCode, java.lang.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
java.lang.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.
-
-