Query Cycle Simulator HEADER

qcsim.net.util
Class PeerMsgQuery

java.lang.Object
  |
  +--qcsim.net.util.PeerMsgQuery
All Implemented Interfaces:
PeerMessage

public class PeerMsgQuery
extends java.lang.Object
implements PeerMessage

Message used to query peers for files.

Version:
1.0
Author:
unascribed

Field Summary
 int contentCategory_
          Content category containing the file being seeked
 int fileRank_
          Rank of file being seeked
 int sourceID_
          Peer id of sending node
 int TTL_
          time-to-live
 
Fields inherited from interface qcsim.net.util.PeerMessage
MSG_QUERY, MSG_QUERYRESPONSE, MSG_REQUESTDOWNLOAD, MSG_REQUESTTRUST, MSG_TRUST
 
Constructor Summary
PeerMsgQuery(int sourceID, int TTL, int contentCategory, int fileRank)
          Constructor
PeerMsgQuery(PeerMsgQuery msg)
          Copy Constructor
 
Method Summary
 int type()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sourceID_

public int sourceID_
Peer id of sending node


TTL_

public int TTL_
time-to-live


contentCategory_

public int contentCategory_
Content category containing the file being seeked


fileRank_

public int fileRank_
Rank of file being seeked

Constructor Detail

PeerMsgQuery

public PeerMsgQuery(int sourceID,
                    int TTL,
                    int contentCategory,
                    int fileRank)
Constructor

Parameters:
sourceID - peer id sending the query
TTL - time to live for the packet.
contentCategory - content category containing the file requested.
fileRank - rank of file being requested.

PeerMsgQuery

public PeerMsgQuery(PeerMsgQuery msg)
Copy Constructor

Parameters:
msg - message to copy.
Method Detail

type

public int type()
Specified by:
type in interface PeerMessage

Query Cycle Simulator HEADER