Package com.powsybl.afs.ws.client.utils
Class ClientUtils
- java.lang.Object
-
- com.powsybl.afs.ws.client.utils.ClientUtils
-
public final class ClientUtils extends Object
- Author:
- Geoffroy Jamgotchian
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UserSession
authenticate(URI baseUri, String login, String password)
static void
checkOk(javax.ws.rs.core.Response response)
static javax.ws.rs.client.Client
createClient()
static <T> T
readEntityIfOk(javax.ws.rs.core.Response response, Class<T> entityType)
static <T> T
readEntityIfOk(javax.ws.rs.core.Response response, javax.ws.rs.core.GenericType<T> entityType)
static <T> Optional<T>
readOptionalEntityIfOk(javax.ws.rs.core.Response response, Class<T> entityType)
-
-
-
Method Detail
-
createClient
public static javax.ws.rs.client.Client createClient()
-
checkOk
public static void checkOk(javax.ws.rs.core.Response response)
-
readEntityIfOk
public static <T> T readEntityIfOk(javax.ws.rs.core.Response response, Class<T> entityType)
-
readEntityIfOk
public static <T> T readEntityIfOk(javax.ws.rs.core.Response response, javax.ws.rs.core.GenericType<T> entityType)
-
readOptionalEntityIfOk
public static <T> Optional<T> readOptionalEntityIfOk(javax.ws.rs.core.Response response, Class<T> entityType)
-
authenticate
public static UserSession authenticate(URI baseUri, String login, String password)
-
-