|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--webfunds.sox.Encodable
|
+--webfunds.sox.Reply
This class is the abstract base class for all reply classes.
| Field Summary | |
protected int |
errorNumber
If the request failed, an error number will be assigned. |
protected java.lang.String |
errorText
At the server's discretion, explanatory strings may be returned. |
protected int |
req_version
Initialised to the Request version number. |
protected java.lang.String |
requestId
An identifier for the request, used to pair up replys with requests when used over connectionless transport layers. |
protected int |
sub_version
Initialised to the extending request version number. |
| Constructor Summary | |
protected |
Reply(Request request)
Create a reply |
protected |
Reply(Request request,
byte[] replyData)
Construct a reply object from a byte array that was previously returned from the encode() method of a reply object. |
protected |
Reply(Request request,
java.io.InputStream is)
Construct a reply object from an input stream that was previously constructed from the encode() output of a reply object. |
protected |
Reply(Request request,
int errNum)
Create a reply, with an error number. |
| Method Summary | |
void |
addErrorText(java.lang.String s)
Append a new error. |
void |
decode(java.io.InputStream is)
Update this reply object with the data read from an inputstream, where the data on the stream was previously written using the encode() method of a reply object. |
void |
encode(java.io.OutputStream os)
Encode a reply to an output stream, suitable for using with ReplyPacket to send remote servers (which use the decode() method to re-construct the object). |
boolean |
equals(java.lang.Object obj)
|
int |
getErrorNumber()
Get the error code. |
java.lang.String |
getErrorText()
Get the string that the server returned. |
java.lang.String |
getRequestId()
Get the identifier for the request which this is a reply for., Note: although a java String is used, this identifier should only contain 8-bit ascii characters. |
java.lang.String |
toString()
Convert this object to a human readable string |
| Methods inherited from class webfunds.sox.Encodable |
decode,
encode,
main,
readByteArray,
readCertificate,
readProperties,
readString,
writeByteArray,
writeCertificate,
writeProperties,
writeString |
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected int req_version
protected int sub_version
protected java.lang.String requestId
protected int errorNumber
protected java.lang.String errorText
| Constructor Detail |
protected Reply(Request request,
int errNum)
request - the request to which this is a replyerrNum - the error numberprotected Reply(Request request)
request - the request to which this is a reply
protected Reply(Request request,
byte[] replyData)
throws SOXPacketException
request - the request that elicited this replyreplyData - the previously encoded reply
protected Reply(Request request,
java.io.InputStream is)
throws SOXPacketException
replyData - the previously encoded reply| Method Detail |
public java.lang.String getRequestId()
public java.lang.String getErrorText()
public void addErrorText(java.lang.String s)
public int getErrorNumber()
public void decode(java.io.InputStream is)
throws SOXPacketException
is - the stream from which to read the reply
public void encode(java.io.OutputStream os)
throws java.io.IOException
os - the stream on which to send the outputpublic java.lang.String toString()
public boolean equals(java.lang.Object obj)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||