|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.kenmccrary.jtella.Message | +--com.kenmccrary.jtella.SearchReplyMessage
Search Reply message(QUERY HIT), response to a search request
Inner Class Summary | |
static class |
SearchReplyMessage.FileRecord
Represents information about a single file served |
Field Summary | |
protected GUID |
guid
|
protected byte |
hops
|
protected Connection |
originatingConnection
|
protected short[] |
payload
|
protected int |
payloadSize
|
static int |
SIZE
|
protected byte |
ttl
|
protected short |
type
|
Constructor Summary | |
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 |
Method Summary | |
void |
addFileRecord(SearchReplyMessage.FileRecord fileRecord)
Adds a file record. |
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 |
SearchReplyMessage.FileRecord |
getFileRecord(int index)
Get information about the files found |
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". |
Connection |
getOriginatingConnection()
Get the connection that was the source for this message |
int |
getPort()
Query the port for this search reply |
java.lang.String |
getVendorCode()
Retrieve the vendor code for the responding servant |
java.lang.String |
toRawString()
Returns a String containing the flattened message |
java.lang.String |
toString()
String representation of the message |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int SIZE
protected Connection originatingConnection
protected GUID guid
protected short type
protected byte ttl
protected byte hops
protected short[] payload
protected int payloadSize
Constructor Detail |
public 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 |
public int getFileCount()
public int getPort()
public java.lang.String getIPAddress()
public int getDownloadSpeed()
public void addFileRecord(SearchReplyMessage.FileRecord fileRecord)
fileRecord
- file informationpublic SearchReplyMessage.FileRecord getFileRecord(int index)
public GUID getClientIdentifier()
public java.lang.String getVendorCode()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toRawString()
public Connection getOriginatingConnection()
Message
was
not read from the network
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |