p2p.simulator.message
Class DeleteResponse

java.lang.Object
  extended by p2p.simulator.message.MessageBody
      extended by p2p.simulator.message.LookupResponse
          extended by p2p.simulator.message.DeleteResponse
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class DeleteResponse
extends LookupResponse

This class creates a special lookup response message body. This special message is used to extract statistics regarding the protocol's lookup algorithm.

See Also:
Serialized Form

Constructor Summary
DeleteResponse(long key, boolean exist, Message msg)
          Creates the body message of a lookup response message.
 
Method Summary
 int getType()
          Returns the message's type.
 java.lang.String toString()
           
 
Methods inherited from class p2p.simulator.message.LookupResponse
getHops
 
Methods inherited from class p2p.simulator.message.MessageBody
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeleteResponse

public DeleteResponse(long key,
                      boolean exist,
                      Message msg)
Creates the body message of a lookup response message.

Parameters:
key - The key of the lookup request.
exist - If the key is found is true, otherwise false.
msg - The initial lookup request message.
Method Detail

getType

public int getType()
Returns the message's type.

Overrides:
getType in class LookupResponse
Returns:
The type of the message

toString

public java.lang.String toString()
Overrides:
toString in class LookupResponse