org.apache.jdo.impl.fostore
Class ReplyHandler

java.lang.Object
  extended byorg.apache.jdo.impl.fostore.ReplyHandler

abstract class ReplyHandler
extends java.lang.Object

Processes replies that are received from the store. Dispatches each one to its corresponding Request.

Author:
Dave Bristor

Field Summary
(package private) static org.apache.commons.logging.Log logger
          Logger
private static org.apache.jdo.util.I18NHelper msg
          I18N support.
 
Constructor Summary
(package private) ReplyHandler()
           
 
Method Summary
(package private) static void processReplies(java.io.DataInput in, Message message)
          Process all replies in the given input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

msg

private static final org.apache.jdo.util.I18NHelper msg
I18N support.


logger

static final org.apache.commons.logging.Log logger
Logger

Constructor Detail

ReplyHandler

ReplyHandler()
Method Detail

processReplies

static void processReplies(java.io.DataInput in,
                           Message message)
Process all replies in the given input stream. The format of the DataInput is
 Version number of the Reply data (of the whole enchilada, not of the
 individual Reply instances).
 Status value indicating the overall success by the server in processing
 the Message.
 
The expected Status value is either OK or FATAL. If FATAL, then the next item is
 String: message from server (such as exception string or stack trace).
 
Otherwise, the next item is
 int: number of replies
 
In the FATAL case, all other data is ignored. Otherwise the remaining data is, per reply:
 RequestId: of the request corresponding to the reply data being read
 Status: of the individual reply
 MessagePos: int which indicates where in the DataInput is a String that
 was generated by the processing of the reply's request.  If this is 0,
 then there is no message.
 length: int indicating the length of the reply's data.
 request-specific data: length bytes of data associated with the reply.