|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dd.api.DDRouteMsg | +--demo.howto.DDHowto.Ping
One of two DD messages used in this test. I inherit from
DDRouteMsg
because I'm talking to a specific other node in
the network. If I wanted to talk to any node holding an object with
GUID
g
, I would use a
DDLocateMsg
instead. Other interesting DD message
types are:
DDMacRouteMsg
-- cryptographically guarentees that the
message is from the node it says it's from
DDPrefixRouteMsg
-- routes to the node with the
GUID
which most closely matches a
given GUID
. For example,
DDPrefixRouteMsg
is used by the OceanStore
archive
to find storage
candidates for erasure
coded fragments
DDPublishReq
-- advertise that your own node is
storing a given object. A DDPublishResp
will be
returned indicating the success or failure of the
DDPublishReq
. Also,
DDPublishReq.publish
==false
-- will stop
advertising an object
Refer to the DD
javadocs for more details about any of
the above.
Since this
class inherits from DDRouteMsg
,
it indirectly inherits from QuickSerializable
,
meaning that we have to define two main functions:
QuickSerializable.serialize(ostore.util.OutputBuffer)
, which takes an
OutputBuffer
and serializes the object into
that buffer.
InputBuffer
where the object can be extracted
from bytes.
TypeTable.type_code(ostore.util.QuickSerializable)
will produce
a unique type_code
based on the wire form of the object.
See below for details.
Field Summary | |
---|---|
int |
seq
sequence number to keep track of ping/pong. |
Fields inherited from class dd.api.DDRouteMsg |
---|
dd_intermediate_upcall, hopCount, inbound, one_hop, peer, recursive_route, TTL |
Constructor Summary | |
---|---|
DDHowto.Ping(InputBuffer buffer)
A deserialization constructor. |
|
DDHowto.Ping(SecureHash dest,
boolean recursive,
boolean dd_intermediate_upcall,
boolean one_hop,
int seq)
A constructor for messages I'm going to send to someone else. |
Method Summary | |
---|---|
void |
serialize(OutputBuffer buffer)
Specified by ostore.util.QuickSerializable A serialization function. |
String |
toString()
Specified by java.lang.Object It's always nice for debugging to define one of these. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int seq
Constructor Detail |
public DDHowto.Ping(SecureHash dest, boolean recursive, boolean dd_intermediate_upcall, boolean one_hop, int seq)
public DDHowto.Ping(InputBuffer buffer)
Method Detail |
public void serialize(OutputBuffer buffer)
serialize
in interface QuickSerializable
serialize
in class DDRouteMsg
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |