public class MessageError extends MessageElement
Constructor and Description |
---|
MessageError(int errorcode,
java.lang.String errormessage)
Creates a message error, with an error code and an error message.
|
Modifier and Type | Method and Description |
---|---|
int |
getErrorcode() |
java.lang.String |
getErrormessage() |
java.lang.String |
serialize(java.lang.String padding,
boolean firstattribute) |
toString
public MessageError(int errorcode, java.lang.String errormessage)
errorcode
- an integer error code. If error code is not used,
it is recommended to send 0errormessage
- the plain text error message. It will likely be logged
or displayed by the other party, so should contain understandable content.public java.lang.String serialize(java.lang.String padding, boolean firstattribute)
serialize
in class MessageElement
firstattribute
- indicates if this element if the first attribute inside
the structure If not, it is expected that the
serialization print a separator (comma)public int getErrorcode()
public java.lang.String getErrormessage()