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


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
SearchMessage(java.lang.String criteria, int minumumSpeed)
          Construct a GNUTella search query
 
Method Summary
 int getMinimumDownloadSpeed()
          Get the minimum download speed for responses
 Connection getOriginatingConnection()
          Get the connection that was the source for this message
 java.lang.String getSearchCriteria()
          Query the search criteria for this message
 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

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
Constructor Detail

SearchMessage

public SearchMessage(java.lang.String criteria,
                     int minumumSpeed)
Construct a GNUTella search query
Method Detail

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