Class ClientFileUploadStatusResponse

java.lang.Object
com.oorian.messaging.responses.Response
com.oorian.messaging.commands.ClientFileUploadStatusResponse

public class ClientFileUploadStatusResponse extends Response
Response command to report the status of a client file upload operation.

This response is sent to update the client on the progress or completion status of a file upload initiated by ClientFileUploadCommand. It extends ElementResponse to associate the status with a specific element.

Features:

  • Reports file upload status codes
  • Associates status with specific elements
  • Supports upload progress tracking
  • Enables client-side upload feedback

Usage:


 // Report successful upload (status code 1)
 ClientFileUploadStatusResponse response = new ClientFileUploadStatusResponse(1, "uploadElement");
 JsonObject json = response.toJson();
 
Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • ClientFileUploadStatusResponse

      public ClientFileUploadStatusResponse(int status, String id)
      Constructs a new ClientFileUploadStatusResponse with the specified status and element ID.
      Parameters:
      status - the status code of the file upload operation
      id - the ID of the element associated with this upload status
  • Method Details

    • toJson

      public JsonObject toJson()
      Generates the JSON representation of this file upload status response.

      The JSON includes the response ID, element ID, and status code.

      Specified by:
      toJson in class Response
      Returns:
      a JsonObject containing the file upload status attributes
    • getElementId

      public String getElementId()
      Returns the unique identifier of the HTML element referenced by this response.

      This ID is used by the client to locate the specific DOM element that should be affected by this response. It typically corresponds to the element's ID attribute in the HTML document.

      Returns:
      the element identifier string