sg.edu.nus.protocol.body
Class SPInsertBundleBody

java.lang.Object
  extended by sg.edu.nus.protocol.body.Body
      extended by sg.edu.nus.protocol.body.SPInsertBundleBody
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class SPInsertBundleBody
extends Body
implements java.io.Serializable

Implement the message body used for inserting a bundle of data items into the super peer network.

Version:
1.0 2006-2-22
Author:
Vu Quang Hieu
See Also:
Serialized Form

Constructor Summary
SPInsertBundleBody(PhysicalInfo physicalSender, java.lang.String docID, java.util.Vector<IndexPair> data)
          Construct the message body with specified parameters
SPInsertBundleBody(java.lang.String serializeData)
          Construct the message body from a string value.
 
Method Summary
 java.util.Vector<IndexPair> getData()
          Get data items wanted to insert
 java.lang.String getDocID()
          Get document id
 PhysicalInfo getPhysicalSender()
          Get physical address of the sender
 java.lang.String getString()
          Return a readable string for testing or writing in the log file
 void setPhysicalSender(PhysicalInfo physicalSender)
          Update physical address of the sender
 java.lang.String toString()
           
 
Methods inherited from class sg.edu.nus.protocol.body.Body
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SPInsertBundleBody

public SPInsertBundleBody(PhysicalInfo physicalSender,
                          java.lang.String docID,
                          java.util.Vector<IndexPair> data)
Construct the message body with specified parameters

Parameters:
physicalSender -
docID -
data -

SPInsertBundleBody

public SPInsertBundleBody(java.lang.String serializeData)
Construct the message body from a string value.

Parameters:
serializeData - the string value that contains the serialized message body
Method Detail

setPhysicalSender

public void setPhysicalSender(PhysicalInfo physicalSender)
Update physical address of the sender

Parameters:
physicalSender - physical address of the sender

getPhysicalSender

public PhysicalInfo getPhysicalSender()
Get physical address of the sender

Returns:
physical address of the sender

getData

public java.util.Vector<IndexPair> getData()
Get data items wanted to insert

Returns:
data items wanted to insert

getDocID

public java.lang.String getDocID()
Get document id

Returns:
docID

getString

public java.lang.String getString()
Return a readable string for testing or writing in the log file

Returns:
a readable string

toString

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