Package com.kheops.jmap.net
Class JMapResponse
java.lang.Object
com.kheops.jmap.net.JMapResponse
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
JMapAdminResponse,JMapExtensionResponse,JMapServerResponse
An abstract class representing a response generated from the execution of a
JMapRequest object by JMapServer.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JMapResponsestatic final intStatus indicating that a request was not processed successfully because the requesting user does not have sufficient privileges.static final intStatus indicating that a request was not processed successfully because the server is currently busy and cannot execute requests.static final intStatus indicating that a request was not processed successfully.static final intStatus indicating that a request was not processed successfully.static final intStatus indicating that the session is invalid.static final intStatus indicating that a request was not sent to JMapServer because a network connection is not available.static final intStatus indicating that a request was processed successfully. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the status message of the response.String[]Returns the message arguments.intReturns the status of the request execution.Returns the status code of the response.voidsetMessage(String message) Sets the optional status message that will be sent to the client.voidsetMessageArgs(String[] messageArgs) Sets the message arguments.voidsetStatus(int status) Sets the status of the request execution.
-
Field Details
-
JMAPSRV_STS_SUCCESS
public static final int JMAPSRV_STS_SUCCESSStatus indicating that a request was processed successfully.- See Also:
-
JMAPSRV_STS_FAILURE
public static final int JMAPSRV_STS_FAILUREStatus 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_DENIEDStatus 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_ERRORStatus 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_BUSYStatus 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_OFFLINEStatus 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_SESSIONStatus indicating that the session is invalid.- See Also:
-
ERROR_RESPONSE
-
-
Constructor Details
-
JMapResponse
public JMapResponse()
-
-
Method Details
-
setMessage
Sets the optional status message that will be sent to the client. Typically used for error messages.- Parameters:
message- the status message
-
getMessage
Returns the status message of the response.- Returns:
- the status message
-
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
Returns the message arguments.- Returns:
- the message arguments
-
setMessageArgs
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
-