ostore.archive
Class RequestFragResponseMsg

java.lang.Object
  |
  +--dd.api.DDRouteMsg
        |
        +--ostore.archive.RequestFragResponseMsg
All Implemented Interfaces:
QueueElementIF, QuickSerializable

public class RequestFragResponseMsg
extends DDRouteMsg

RequestFragResponseMsg is the StorageServers response to a RequestFragMsg and containing either a Fragment or the block itself.

USAGE

To receive Fragments, dispatch a RequestFragMsg that contains a guid of the block to be recoalesced.

Version:
$Id: RequestFragResponseMsg.java,v 1.14 2004/05/13 20:13:06 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
ArchivalStorageStage, RequestorStage, RecoalesceBlkStage, RequestFragMsg, RequestFragQuery, RequestFragQueryState, DDLocateMsg

Field Summary
 QuickSerializable response
           
 SecureHash responseGuid
           
 
Fields inherited from class dd.api.DDRouteMsg
dd_intermediate_upcall, hopCount, inbound, one_hop, peer, recursive_route, TTL
 
Constructor Summary
RequestFragResponseMsg(InputBuffer buffer)
          Constructs a RequestFragResponseMsg from its serialized form.
RequestFragResponseMsg(SecureHash requestorGuid, SecureHash respGuid, QuickSerializable resp, boolean recursive, boolean dd_intermediate_upcall, boolean one_hop)
          Construct according to the given fields.
 
Method Summary
 QuickSerializable getResponse()
          getResponse returns the response to the RequestFragMsg.
 SecureHash getResponseGuid()
          getResponseGuid returns the guid of the originally requested obj specified in the RequestFragMsg.
 void serialize(OutputBuffer buffer)
          Specified by ostore.util.QuickSerializable
 String toString()
          Specified by java.lang.Object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

responseGuid

public SecureHash responseGuid

response

public QuickSerializable response
Constructor Detail

RequestFragResponseMsg

public RequestFragResponseMsg(SecureHash requestorGuid,
                              SecureHash respGuid,
                              QuickSerializable resp,
                              boolean recursive,
                              boolean dd_intermediate_upcall,
                              boolean one_hop)
Construct according to the given fields.


RequestFragResponseMsg

public RequestFragResponseMsg(InputBuffer buffer)
                       throws QSException
Constructs a RequestFragResponseMsg from its serialized form.

Parameters:
buffer - serialized form of object.
Method Detail

getResponse

public final QuickSerializable getResponse()
getResponse returns the response to the RequestFragMsg.

Returns:
the response to the RequestFragMsg.

getResponseGuid

public final SecureHash getResponseGuid()
getResponseGuid returns the guid of the originally requested obj specified in the RequestFragMsg.

Returns:
the guid specified in the RequestFragMsg.

serialize

public void serialize(OutputBuffer buffer)
Specified by ostore.util.QuickSerializable

Specified by:
serialize in interface QuickSerializable
Overrides:
serialize in class DDRouteMsg
Parameters:
buffer - the output buffer to add the object to

toString

public String toString()
Specified by java.lang.Object

Overrides:
toString in class Object