|
Query Cycle Simulator HEADER | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Provides a GUI description of a peer and its downloads.
| Method Summary | |
PeerDescription |
badResponse(int i)
The ith peer who sent an inauthentic file during the cycle |
int |
badResponses()
The number of bad responses up to and including the cycle. |
int |
behavior()
The peer behavior type. |
java.awt.Color |
color(boolean trust)
Funtion will return the color that the peer should use to paint itself. |
boolean |
contains(int x,
int y)
Will specify if this peer is contains the given coordinates. |
void |
cycle(int cycle)
Used to inform the Peer's history of a new cycle This signal the history object to start tracking a new cycle. |
void |
displayDescription(java.awt.Dimension dim,
double pos)
This method will set display information needed by the peer's description object. |
java.util.Vector |
downloadDescriptions()
Get a descriptions of the peers downloads. |
void |
draw(java.awt.Graphics g,
java.awt.Color color)
This will draw the peer with the specified color. |
void |
drawLinks(java.awt.Graphics g,
java.awt.Color color)
This will draw the links that connect this peer to others. |
int |
failedDownloads()
The number of failed downloads up to and including the cycle. |
double |
globalTrust()
Yields trust value computed by this peer. |
int |
goodDownloads()
The number of good downloads up to and including the cycle. |
PeerDescription |
goodResponse()
The peer who sent a good file during the cycle. |
int |
goodUploads()
The number of good uploads up to and including the cycle. |
int |
inauthenticDownloads()
The number of inauthentic downloads up to and including the cycle. |
int |
inauthenticUploads()
The number of inauthentic uploads up to and including the cycle. |
void |
manager(QueryCycleManager manager)
The Query Cycle Manager, which is used to get the peer descriptions of other peers in the system. |
int |
peerID()
The id of the peer this description describes. |
java.awt.geom.Point2D |
position()
The current position of the peer description on the display. |
int |
queryResponseAttempts()
Get number of query response attempts. |
int |
voidDownloads()
The number of void downloads up to and including the cycle. |
| Method Detail |
public void displayDescription(java.awt.Dimension dim,
double pos)
dim - describes the display dimension.pos - used to conpute the peer's position on the displaypublic void manager(QueryCycleManager manager)
manager - The Query Cycle Manager.
public void draw(java.awt.Graphics g,
java.awt.Color color)
g - The graphics to draw on.color - The color of the peer.public java.util.Vector downloadDescriptions()
public void drawLinks(java.awt.Graphics g,
java.awt.Color color)
color - The color of the links.public java.awt.Color color(boolean trust)
trust - If true then base color off of trust value.
public boolean contains(int x,
int y)
x - the x position.y - the y position.
public java.awt.geom.Point2D position()
public int peerID()
public int behavior()
public void cycle(int cycle)
cycle - the new cycle.public int goodDownloads()
public int inauthenticDownloads()
public int voidDownloads()
public int failedDownloads()
public int goodUploads()
public int inauthenticUploads()
public int queryResponseAttempts()
public int badResponses()
public PeerDescription badResponse(int i)
i - the ith peer.public PeerDescription goodResponse()
public double globalTrust()
|
Query Cycle Simulator HEADER | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||