com.kenmccrary.jtella
Class SearchMessage
java.lang.Object
|
+--com.kenmccrary.jtella.Message
|
+--com.kenmccrary.jtella.SearchMessage
- public class SearchMessage
- extends com.kenmccrary.jtella.Message
SearchMessage, the message for queries
Constructor Summary |
SearchMessage(java.lang.String criteria,
int minumumSpeed)
Construct a GNUTella search query |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SIZE
public static final int SIZE
originatingConnection
protected Connection originatingConnection
guid
protected GUID guid
type
protected short type
ttl
protected byte ttl
hops
protected byte hops
payload
protected short[] payload
payloadSize
protected int payloadSize
SearchMessage
public SearchMessage(java.lang.String criteria,
int minumumSpeed)
- Construct a GNUTella search query
getMinimumDownloadSpeed
public int getMinimumDownloadSpeed()
- Get the minimum download speed for responses
- Returns:
- download speed
getSearchCriteria
public java.lang.String getSearchCriteria()
- Query the search criteria for this message
- Returns:
- search criteria
toString
public java.lang.String toString()
- String representation of the message
- Overrides:
toString
in class java.lang.Object
toRawString
public java.lang.String toRawString()
- Returns a String containing the flattened message
- Returns:
- message string
getOriginatingConnection
public Connection getOriginatingConnection()
- Get the connection that was the source for this message
- Returns:
- originating connection or null if this
Message
was
not read from the network