webfunds.sox
Class TimeSyncReply

java.lang.Object
  |
  +--webfunds.sox.Encodable
        |
        +--webfunds.sox.Reply
              |
              +--webfunds.sox.TimeSyncReply

public class TimeSyncReply
extends Reply

See Also:
Serialized Form

Field Summary
protected  long diff
          The time difference between the issuer and client
 
Fields inherited from class webfunds.sox.Reply
errorNumber, errorText, req_version, requestId, sub_version
 
Constructor Summary
TimeSyncReply(Request request, int errNum)
          Create a TimeSyncReply reply
TimeSyncReply(Request request, long diff)
          Create a TimeSync reply
TimeSyncReply(TimeSyncRequest request, byte[] data)
           
TimeSyncReply(TimeSyncRequest request, java.io.InputStream is)
           
 
Method Summary
 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).
 long getTimeDifference()
           
 java.lang.String toString()
          Convert this object to a human readable string
 
Methods inherited from class webfunds.sox.Reply
addErrorText, equals, getErrorNumber, getErrorText, getRequestId
 
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

diff

protected long diff
The time difference between the issuer and client
Constructor Detail

TimeSyncReply

public TimeSyncReply(Request request,
                     long diff)
Create a TimeSync reply
Parameters:
the - difference between the request's time and the issuer's time

TimeSyncReply

public TimeSyncReply(Request request,
                     int errNum)
Create a TimeSyncReply reply

TimeSyncReply

public TimeSyncReply(TimeSyncRequest request,
                     byte[] data)
              throws SOXPacketException

TimeSyncReply

public TimeSyncReply(TimeSyncRequest request,
                     java.io.InputStream is)
              throws SOXPacketException
Method Detail

getTimeDifference

public long getTimeDifference()

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