webfunds.sox
Class NymReply
java.lang.Object
|
+--webfunds.sox.Encodable
|
+--webfunds.sox.Reply
|
+--webfunds.sox.NymReply
- public class NymReply
- extends Reply
A deposit reply.
This might want to change to being an extension of MailReply
in the next change.
- See Also:
- Serialized Form
|
Method Summary |
protected static void |
cycle()
|
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)
|
static NymReply |
example()
|
static NymReply |
example(NymRequest req)
|
long |
getFlags()
Rather than predict what information is required, just use
a big long for flags. |
java.lang.String[] |
getNames()
Rather than predict what information is required, just use
an array of strings. |
protected static void |
input()
|
static void |
main(java.lang.String[] args)
|
protected static void |
output()
|
protected static void |
readWrite()
|
void |
setFlags(long flags)
|
void |
setNames(java.lang.String[] names)
Set the names. |
java.lang.String |
toString()
Convert this object to a human readable string |
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
SUCCEEDED
public static final int SUCCEEDED
INTERNAL_ERROR
public static final int INTERNAL_ERROR
NOT_PERMITTED
public static final int NOT_PERMITTED
FROZEN
public static final int FROZEN
BAD_DATA
public static final int BAD_DATA
NymReply
public NymReply(NymRequest request,
java.lang.String[] names,
long flags)
- Create a Good NymReply.
NymReply
public NymReply(NymRequest request,
int errno,
java.lang.String errors)
- Create a Good NymReply but with a bad result.
NymReply
public NymReply(NymRequest request,
int errNum)
- Create a Bad NymReply - required by NymRequest
NymReply
public NymReply(NymRequest request,
byte[] data)
throws SOXPacketException
NymReply
public NymReply(NymRequest request,
java.io.InputStream is)
throws SOXPacketException
getNames
public java.lang.String[] getNames()
- Rather than predict what information is required, just use
an array of strings. Some conventions:
0. short, printable PUBLISHABLE nickname
1. email address
Fields can be empty (null or empty, it is the same with SOX).
Any other definitions can be handled at the application layer.
setNames
public void setNames(java.lang.String[] names)
- Set the names.
The array is copied, and all nulls converted to empties.
Note that the strings are really treated as byte arrays.
getFlags
public long getFlags()
- Rather than predict what information is required, just use
a big long for flags.
Any definitions can be handled at the application layer.
setFlags
public void setFlags(long flags)
encode
public void encode(java.io.OutputStream os)
throws java.io.IOException
- Description copied from class: Reply
- 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).
This method is usually used by subclasses to decode
the request-id field.
- Overrides:
- encode in class Reply
- Tags copied from class: Reply
- Parameters:
os - the stream on which to send the output- Returns:
- byte[] the reply in encoded form
decode
public void decode(java.io.InputStream is)
throws SOXPacketException
- Description copied from class: Reply
- 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.
This method is usually used by subclasses to decode
the request-id field.
- Overrides:
- decode in class Reply
- Tags copied from class: Reply
- Parameters:
is - the stream from which to read the reply
toString
public java.lang.String toString()
- Description copied from class: Reply
- Convert this object to a human readable string
- Overrides:
- toString in class Reply
equals
public boolean equals(java.lang.Object obj)
- Overrides:
- equals in class Reply
example
public static NymReply example(NymRequest req)
example
public static NymReply example()
main
public static void main(java.lang.String[] args)
cycle
protected static void cycle()
throws java.lang.Exception
output
protected static void output()
throws java.lang.Exception
readWrite
protected static void readWrite()
throws java.lang.Exception
input
protected static void input()
throws java.lang.Exception