Interface TestandtargetHttpClient
-
@ProviderType public interface TestandtargetHttpClient
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TestandtargetHttpClient.TestandtargetMethodType
Http method used in the API callstatic class
TestandtargetHttpClient.TestandtargetSolution
Solution to be called either Target or Target Recommendations
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
execute(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.String
execute(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.String
executeRestCall(TestandtargetCallOptions options)
Executes a call against the Adobe Target REST APIjava.lang.String
executeRestCall(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.String
executeRestGetCall(TestandtargetCallOptions options)
Executes a GET request against the Adobe Target REST APIjava.lang.String
executeRestGetCall(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 APIint
getConnectionTimeout()
Returns the configured timeout in milliseconds until a connection is established.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.
-
-
-
Method Detail
-
execute
java.lang.String execute(java.lang.String[] queryKey, java.lang.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
java.lang.String executeRestGetCall(java.lang.String clientCode, java.lang.String location, java.util.Map<java.lang.String,java.lang.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.json
parameters
- 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
- aTestandtargetCallOptions
object 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.TestandtargetMethodType
indicating the method to be executed for the call (GET, POST, PUT or DELETE)solution
- - the solution to be called, either Target or Target Recommendationsparameters
- - aTestandtargetHttpParameters
containing 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.TestandtargetMethodType
indicating 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.json
solution
- - the solution to be called, either Target or Target Recommendationsparameters
- - aTestandtargetHttpParameters
containing 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
- aTestandtargetCallOptions
object containing the call options- Returns:
- a
String
representation 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.
-
-