public class CwsResponse extends Object implements Serializable
General Response Object, embedded in all other Response Objects, as it contains the processing result, i.e. return code & message. If everything went good, the return code will the code 200, same as the HTTP protocol will return if everything went well. The return message will simple be 'Ok' in this case.
If a problem occurred, either a warning (problem which can be corrected by the invoking system/member), or an error (internal problem, most likely a resource issue). The return code & message should hopefully provide enough information for the System Administrator to correct the problem.
The class ReturnCode
for more information, and clarification of
the individual warnings or errors which may occur.
Constructor and Description |
---|
CwsResponse()
Empty Constructor, to use if the setters are invoked.
|
CwsResponse(ReturnCode returnCode,
String returnMessage)
Error Constructor, used if an error occurred, and the request could not
complete successfully.
|
Modifier and Type | Method and Description |
---|---|
int |
getReturnCode() |
String |
getReturnMessage() |
boolean |
isOk() |
void |
setReturnCode(ReturnCode returnCode) |
void |
setReturnMessage(String returnMessage) |
public CwsResponse()
public CwsResponse(ReturnCode returnCode, String returnMessage)
returnCode
- The CWS Return CodereturnMessage
- The CWS Return Messagepublic final void setReturnCode(ReturnCode returnCode)
public final int getReturnCode()
public final void setReturnMessage(String returnMessage)
public final String getReturnMessage()
public final boolean isOk()
Copyright © 2019 JavaDog.io. All rights reserved.