Class JKFileDownloadServiceCaller

java.lang.Object
com.jk.services.client.JKFileDownloadServiceCaller
All Implemented Interfaces:
JKServiceCaller

public class JKFileDownloadServiceCaller extends Object implements JKServiceCaller
This class implements the JKServiceCaller interface for making service calls to download files.
Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Constructor Summary

    Constructors
    Constructor
    Description
    This method constructs a new JKFileDownloadServiceCaller with the provided object.
  • Method Summary

    Modifier and Type
    Method
    Description
    jakarta.ws.rs.core.Response
    call(jakarta.ws.rs.client.Invocation.Builder builder)
    This method makes an HTTP service call using the provided builder to construct the request.
    This method gets the media type that the service caller expects in the response.
    readResponse(jakarta.ws.rs.core.Response response)
    This method reads and processes the response received from the service.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JKFileDownloadServiceCaller

      public JKFileDownloadServiceCaller(Object object)
      This method constructs a new JKFileDownloadServiceCaller with the provided object.
      Parameters:
      object - Specifies the object associated with this instance.
  • Method Details

    • call

      public jakarta.ws.rs.core.Response call(jakarta.ws.rs.client.Invocation.Builder builder)
      This method makes an HTTP service call using the provided builder to construct the request.
      Specified by:
      call in interface JKServiceCaller
      Parameters:
      builder - Specifies the builder used to construct the HTTP request.
      Returns:
      the HTTP response received from the service.
    • readResponse

      public Object readResponse(jakarta.ws.rs.core.Response response)
      This method reads and processes the response received from the service.
      Specified by:
      readResponse in interface JKServiceCaller
      Parameters:
      response - Specifies the HTTP response received from the service.
      Returns:
      an object representing the processed response data.
    • getAcceptMedia

      public String getAcceptMedia()
      This method gets the media type that the service caller expects in the response.
      Specified by:
      getAcceptMedia in interface JKServiceCaller
      Returns:
      the media type expected in the response.