Class JMapResponse

java.lang.Object
com.kheops.jmap.net.JMapResponse
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
JMapAdminResponse, JMapExtensionResponse, JMapServerResponse

public class JMapResponse extends Object implements Serializable
An abstract class representing a response generated from the execution of a JMapRequest object by JMapServer.
See Also:
  • Field Details

    • JMAPSRV_STS_SUCCESS

      public static final int JMAPSRV_STS_SUCCESS
      Status indicating that a request was processed successfully.
      See Also:
    • JMAPSRV_STS_FAILURE

      public static final int JMAPSRV_STS_FAILURE
      Status indicating that a request was not processed successfully. This can be caused by invalid request parameters.
      See Also:
    • JMAPSRV_STS_ACCESS_DENIED

      public static final int JMAPSRV_STS_ACCESS_DENIED
      Status indicating that a request was not processed successfully because the requesting user does not have sufficient privileges.
      See Also:
    • JMAPSRV_STS_ERROR

      public static final int JMAPSRV_STS_ERROR
      Status indicating that a request was not processed successfully. In this case, it indicates that an abnormal error occurred when processing the request.
      See Also:
    • JMAPSRV_STS_BUSY

      public static final int JMAPSRV_STS_BUSY
      Status indicating that a request was not processed successfully because the server is currently busy and cannot execute requests. Typically happens during server startups and shutdowns.
      See Also:
    • JMAPSRV_STS_OFFLINE

      public static final int JMAPSRV_STS_OFFLINE
      Status indicating that a request was not sent to JMapServer because a network connection is not available.
      See Also:
    • JMAPSRV_STS_INVALID_SESSION

      public static final int JMAPSRV_STS_INVALID_SESSION
      Status indicating that the session is invalid.
      See Also:
    • ERROR_RESPONSE

      public static final JMapResponse ERROR_RESPONSE
  • Constructor Details

    • JMapResponse

      public JMapResponse()
  • Method Details

    • setMessage

      public void setMessage(String message)
      Sets the optional status message that will be sent to the client. Typically used for error messages.
      Parameters:
      message - the status message
    • getMessage

      public String getMessage()
      Returns the status message of the response.
      Returns:
      the status message
    • getUnformatedMessageCode

      public String getUnformatedMessageCode()
      Returns the status code of the response.
      Returns:
      the status code
    • setStatus

      public void setStatus(int status)
      Sets the status of the request execution. This provides information to the client about the execution of the request.
      Parameters:
      status - the status
    • getStatus

      public int getStatus()
      Returns the status of the request execution.
      Returns:
      the status
    • getMessageArgs

      public String[] getMessageArgs()
      Returns the message arguments.
      Returns:
      the message arguments
    • setMessageArgs

      public void setMessageArgs(String[] messageArgs)
      Sets the message arguments. This is used to provide values to insert in internationalized messages referenced by a message code.
      Parameters:
      messageArgs - the values to insert in the response message