Package fr.gouv.vitam.common.client

# Class AbstractMockClient

java.lang.Object
fr.gouv.vitam.common.client.AbstractMockClient

All Implemented Interfaces:
  `MockOrRestClient`, `VitamAutoCloseable`, `AutoCloseable`

Direct Known Subclasses:
  `AdminManagementClientMock`, `IngestInternalClientMock`, `LogbookOperationsClientMock`, `MetaDataClientMock`, `ProcessingManagementClientMock`, `StorageClientMock`

public class AbstractMockClient extends Object implements MockOrRestClient
Abstract Mock common client

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `AbstractMockClient.FakeInboundResponse`
  Fake Inbound Response for Mock client support

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractMockClient()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `checkStatus()`
  Check the status from the service
  `void`
  `checkStatus(jakarta.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 certificate
  `void`
  `close()`
  Close the underneath http client
  `void`
  `consumeAnyEntityAndClose(jakarta.ws.rs.core.Response response)`
  Helper when an error occurs on client usage side to consume response however
  `String`
  `getResourcePath()`
  Get the resource path of the server.
  `String`
  `getServiceUrl()`
  Get the service URL

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AbstractMockClient

    public AbstractMockClient()

- ## Method Details

  - ### checkStatus

    public void checkStatus()
    Description copied from interface: `MockOrRestClient`
    Check the status from the service
    Specified by:
      `checkStatus` in interface `MockOrRestClient`

  - ### checkStatus

    public void checkStatus(jakarta.ws.rs.core.MultivaluedHashMap<String,Object> headers) throws VitamApplicationServerException
    Description 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 interface `MockOrRestClient`
    Parameters:
      `headers` -
    Throws:
      `VitamApplicationServerException` - if the Server is unavailable

  - ### close

    public void close()
    Description copied from interface: `MockOrRestClient`
    Close the underneath http client
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `MockOrRestClient`
    Specified by:
      `close` in interface `VitamAutoCloseable`

  - ### getResourcePath

    public String getResourcePath()
    Description copied from interface: `MockOrRestClient`
    Get the resource path of the server.
    Specified by:
      `getResourcePath` in interface `MockOrRestClient`
    Returns:
      the resource path as string

  - ### getServiceUrl

    public String getServiceUrl()
    Description copied from interface: `MockOrRestClient`
    Get the service URL
    Specified by:
      `getServiceUrl` in interface `MockOrRestClient`
    Returns:
      the service URL

  - ### consumeAnyEntityAndClose

    public void consumeAnyEntityAndClose(jakarta.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 interface `MockOrRestClient`
    Parameters:
      `response` -