|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgps.protocol.BT.param.BTGetRequest
public class BTGetRequest
includes informations in the get command from peer to server. Tracker GET request includes the following keys: info_hash: hash key of the intened document peer_id ip port uploaded downloaded left event: started, completed, or stopped, or empty In our simulation, only relavent information is included the get request is identified by docHashKey
| Field Summary | |
|---|---|
static int |
COMPLETED
download finished |
BTPeer |
mBTPeer
reference back to BTPeer |
BTSession |
mBTSession
reference back to BTSession object that send out the request |
java.lang.String |
mDocHashKey
document hash key |
int |
mEvent
request type |
double |
mLeft
left amount |
static int |
STARTED
download first begins |
static int |
STOPPED
download cancelled |
| Constructor Summary | |
|---|---|
BTGetRequest(java.lang.String hashKey,
int event,
double left,
BTSession session)
constructs new request object |
|
| Method Summary | |
|---|---|
java.lang.String |
eventToString()
gets string description of request |
java.lang.String |
toString()
gets string description of request |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int STARTED
public static final int COMPLETED
public static final int STOPPED
public java.lang.String mDocHashKey
public int mEvent
public double mLeft
public BTSession mBTSession
public BTPeer mBTPeer
| Constructor Detail |
|---|
public BTGetRequest(java.lang.String hashKey,
int event,
double left,
BTSession session)
hashKey - document hash keyevent - request typeleft - left sizesession - requesting session| Method Detail |
|---|
public java.lang.String eventToString()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||