|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucr.core.Message
ucr.core.SearchReplyMessage
Search Reply message(QUERY HIT), response to a search request
Field Summary | |
private java.util.Vector |
fileRecords
|
private java.lang.String |
ipAddress
|
private short |
port
|
private SearchMessage |
searchMessage
|
private int |
speed
|
private java.lang.String |
vendorCode
|
Fields inherited from class ucr.core.Message |
guid, hops, originatingConnection, payload, payloadSize, QUERY, QUERYREPLY, SIZE, SIZE_QUERY_PAYLOAD, SIZE_QUERYREPLY_PAYLOAD, TRACE, TRACEREPLY, ttl, type |
Constructor Summary | |
(package private) |
SearchReplyMessage()
|
(package private) |
SearchReplyMessage(Message m)
Construct a SearchReply message |
|
SearchReplyMessage(SearchMessage searchMessage,
short port,
java.lang.String ipAddress,
int speed)
Used to respond to a query message |
|
SearchReplyMessage(SearchMessage searchMessage,
short port,
java.lang.String ipAddress,
int speed,
java.lang.String vendorCode)
Used to respond to a query message |
(package private) |
SearchReplyMessage(short[] rawMessage,
Connection originatingConnection)
Construct a search reply message from data read read from network |
Method Summary | |
void |
addFileRecord(FileRecord fileRecord)
Adds a file record. |
(package private) void |
buildPayload()
Contructs the payload for the search reply message |
(package private) byte[] |
getByteArray()
Produces a byte[] suitable for GNUTELLA network |
GUID |
getClientIdentifier()
Retrieve the client GUID for the replying servant |
int |
getDownloadSpeed()
Returns the replying host's connection bandwidth |
int |
getFileCount()
Query the umber of files found for the search |
FileRecord |
getFileRecord(int index)
Get information about the files found |
private int |
getFileRecordBounds()
Method to determine the ending ending for file data. |
java.lang.String |
getIPAddress()
Query the IP address for this pong message result is an IP address in the form of "206.26.48.100". |
int |
getPort()
Query the port for this search reply |
java.lang.String |
getVendorCode()
Retrieve the vendor code for the responding servant |
private boolean |
isBearShareTrailerPresent()
Check if the bearshare trailer is present between file records and GUID |
Methods inherited from class ucr.core.Message |
addPayload, addPayload, getGUID, getHops, getOriginatingConnection, getPayload, getPayloadLength, getTTL, getType, setGUID, setHops, setTTL, toRawString, toString, validatePayloadSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.util.Vector fileRecords
private SearchMessage searchMessage
private short port
private java.lang.String ipAddress
private int speed
private java.lang.String vendorCode
Constructor Detail |
SearchReplyMessage(Message m)
SearchReplyMessage()
SearchReplyMessage(short[] rawMessage, Connection originatingConnection)
rawMessage
- binary data from a connectionoriginatingConnection
- Connection creating this messagepublic SearchReplyMessage(SearchMessage searchMessage, short port, java.lang.String ipAddress, int speed)
searchMessage
- the search thats being responded toport
- the point used for downloadipAddress
- of the servantspeed
- download speed in kilobytes/secpublic SearchReplyMessage(SearchMessage searchMessage, short port, java.lang.String ipAddress, int speed, java.lang.String vendorCode)
searchMessage
- the search thats being responded toport
- the point used for downloadipAddress
- of the servantspeed
- download speed in kilobytes/secvendorCode
- option 4 byte value identifying the servant vendorMethod Detail |
void buildPayload()
public int getFileCount()
public int getPort()
public java.lang.String getIPAddress()
public int getDownloadSpeed()
public void addFileRecord(FileRecord fileRecord)
fileRecord
- file informationpublic FileRecord getFileRecord(int index)
public GUID getClientIdentifier()
public java.lang.String getVendorCode()
byte[] getByteArray()
getByteArray
in class Message
private boolean isBearShareTrailerPresent()
private int getFileRecordBounds()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |