Class AzureStorageBlobReactiveService

java.lang.Object
it.pagopa.swclient.mil.azureservices.storageblob.service.AzureStorageBlobReactiveService

@ApplicationScoped public class AzureStorageBlobReactiveService extends Object

This service is a kind of wrapper of AzureStorageBlobReactiveClient which implements:

Author:
Antonio Tarricone
  • Field Details

  • Constructor Details

  • Method Details

    • proceed

      private io.smallrye.mutiny.Uni<Object> proceed(jakarta.interceptor.InvocationContext context)

      Transforms Exception in RuntimeException to allow handling with Mutiny.

      Parameters:
      context - InvocationContext
      Returns:
      Object returned by the target method.
    • authenticate

      Object authenticate(jakarta.interceptor.InvocationContext context)

      This method decorates the others:

      • retrieving the access token from Microsoft Entra ID by means of AzureIdentityReactiveService;
      • renewing of the access token from Microsoft Entra ID the invoked target API returns 401 or 403.
      Parameters:
      context - InvocationContext
      Returns:
      Object returned by the target method.
    • getBlob

      public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> getBlob(String filename)

      Returns a blob with the given file name.

      Parameters:
      filename - The name of file to retrieve.
      Returns:
      If the file is retrieved successfully, the response body contains it.
    • getBlob

      public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> getBlob(String segment1, String filename)

      Returns a blob with the given file name and path.

      Parameters:
      segment1 - Segment of the path to file to retrieve.
      filename - The name of file to retrieve.
      Returns:
      If the file is retrieved successfully, the response body contains it.
    • getBlob

      public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> getBlob(String segment1, String segment2, String filename)

      Returns a blob with the given file name and path.

      Parameters:
      segment1 - Segment of the path to file to retrieve.
      segment2 - Segment of the path to file to retrieve.
      filename - The name of file to retrieve.
      Returns:
      If the file is retrieved successfully, the response body contains it.
    • getBlob

      public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> getBlob(String segment1, String segment2, String segment3, String filename)

      Returns a blob with the given file name and path.

      Parameters:
      segment1 - Segment of the path to file to retrieve.
      segment2 - Segment of the path to file to retrieve.
      segment3 - Segment of the path to file to retrieve.
      filename - The name of file to retrieve.
      Returns:
      If the file is retrieved successfully, the response body contains it.
    • getBlob

      public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> getBlob(String segment1, String segment2, String segment3, String segment4, String filename)

      Returns a blob with the given file name and path.

      Parameters:
      segment1 - Segment of the path to file to retrieve.
      segment2 - Segment of the path to file to retrieve.
      segment3 - Segment of the path to file to retrieve.
      segment4 - Segment of the path to file to retrieve.
      filename - The name of file to retrieve.
      Returns:
      If the file is retrieved successfully, the response body contains it.
    • getBlob

      public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> getBlob(String segment1, String segment2, String segment3, String segment4, String segment5, String filename)

      Returns a blob with the given file name and path.

      Parameters:
      segment1 - Segment of the path to file to retrieve.
      segment2 - Segment of the path to file to retrieve.
      segment3 - Segment of the path to file to retrieve.
      segment4 - Segment of the path to file to retrieve.
      segment5 - Segment of the path to file to retrieve.
      filename - The name of file to retrieve.
      Returns:
      If the file is retrieved successfully, the response body contains it.
    • getBlob

      public io.smallrye.mutiny.Uni<jakarta.ws.rs.core.Response> getBlob(String segment1, String segment2, String segment3, String segment4, String segment5, String segment6, String filename)

      Returns a blob with the given file name and path.

      Parameters:
      segment1 - Segment of the path to file to retrieve.
      segment2 - Segment of the path to file to retrieve.
      segment3 - Segment of the path to file to retrieve.
      segment4 - Segment of the path to file to retrieve.
      segment5 - Segment of the path to file to retrieve.
      segment6 - Segment of the path to file to retrieve.
      filename - The name of file to retrieve.
      Returns:
      If the file is retrieved successfully, the response body contains it.