Class DefaultAdminClient
java.lang.Object
fr.gouv.vitam.common.external.client.DefaultAdminClient
- All Implemented Interfaces:
MockOrRestClient
,AdminClient
,BasicClient
,VitamAutoCloseable
,AutoCloseable
-
Field Summary
Fields inherited from interface fr.gouv.vitam.common.external.client.BasicClient
STATUS_URL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCheck the dependencies and return a VitamError status where getHttpCode contains either 200 for OK or 503 for error and a sub list of VitamErrors for each tested subservicesGet the administration status from the servicevoid
Check the status from the servicevoid
checkStatus
(javax.ws.rs.core.MultivaluedHashMap<String, Object> headers) Check the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificatevoid
close()
Close the underneath http clientfinal void
consumeAnyEntityAndClose
(javax.ws.rs.core.Response response) Helper when an error occurs on client usage side to consume response howeverjavax.ws.rs.client.Client
javax.ws.rs.client.Client
Get the resource path of the server.Get the service URLjavax.ws.rs.core.Response
make
(VitamRequestBuilder request) javax.ws.rs.core.Response
makeSpecifyingUrl
(VitamRequestBuilder request) static void
staticConsumeAnyEntityAndClose
(javax.ws.rs.core.Response response) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface fr.gouv.vitam.common.client.MockOrRestClient
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
-
Constructor Details
-
DefaultAdminClient
-
-
Method Details
-
adminStatus
Description copied from interface:AdminClient
Get the administration status from the service- Specified by:
adminStatus
in interfaceAdminClient
- Returns:
- the AdminStatusMessage
- Throws:
VitamClientException
- if the Server is unreachable
-
adminAutotest
Description copied from interface:AdminClient
Check the dependencies and return a VitamError status where getHttpCode contains either 200 for OK or 503 for error and a sub list of VitamErrors for each tested subservices- Specified by:
adminAutotest
in interfaceAdminClient
- Returns:
- the VitamError status, both in case of OK or ServiceUnavailable
- Throws:
VitamClientException
-
getAdminUrl
- Specified by:
getAdminUrl
in interfaceAdminClient
- Returns:
- the adminUrl
-
staticConsumeAnyEntityAndClose
public static void staticConsumeAnyEntityAndClose(javax.ws.rs.core.Response response) -
consumeAnyEntityAndClose
public final void consumeAnyEntityAndClose(javax.ws.rs.core.Response response) Description copied from interface:MockOrRestClient
Helper when an error occurs on client usage side to consume response however- Specified by:
consumeAnyEntityAndClose
in interfaceMockOrRestClient
-
checkStatus
Description copied from interface:MockOrRestClient
Check the status from the service- Specified by:
checkStatus
in interfaceMockOrRestClient
- Throws:
VitamApplicationServerException
- if the Server is unavailable
-
checkStatus
public void checkStatus(javax.ws.rs.core.MultivaluedHashMap<String, Object> headers) throws VitamApplicationServerExceptionDescription copied from interface:MockOrRestClient
Check the status from the service used to passe "X-SSL-CLIENT-CERT" header that contain a pem certificate- Specified by:
checkStatus
in interfaceMockOrRestClient
- Throws:
VitamApplicationServerException
- if the Server is unavailable
-
getResourcePath
Description copied from interface:MockOrRestClient
Get the resource path of the server.- Specified by:
getResourcePath
in interfaceMockOrRestClient
- Returns:
- the resource path as string
-
getServiceUrl
Description copied from interface:MockOrRestClient
Get the service URL- Specified by:
getServiceUrl
in interfaceMockOrRestClient
- Returns:
- the service URL
-
close
public void close()Description copied from interface:MockOrRestClient
Close the underneath http client- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceMockOrRestClient
- Specified by:
close
in interfaceVitamAutoCloseable
-
toString
-
makeSpecifyingUrl
public javax.ws.rs.core.Response makeSpecifyingUrl(VitamRequestBuilder request) throws VitamClientInternalException - Throws:
VitamClientInternalException
-
make
public javax.ws.rs.core.Response make(VitamRequestBuilder request) throws VitamClientInternalException - Throws:
VitamClientInternalException
-
getChunkedClient
public javax.ws.rs.client.Client getChunkedClient() -
getClient
public javax.ws.rs.client.Client getClient() -
getClientFactory
-