com.limegroup.gnutella.search
Class HostData

java.lang.Object
  extended bycom.limegroup.gnutella.search.HostData

public final class HostData
extends java.lang.Object

This class contains data about a host that has returned a query hit, as opposed to the data about the file itself, which is contained in Response.


Constructor Summary
HostData(QueryReply reply)
          Constructs a new HostData instance from a QueryReply.
 
Method Summary
 byte[] getClientGUID()
          Accessor for the client guid for the host.
 java.lang.String getIP()
          Accessor for the ip address of the host sending the reply.
 byte[] getMessageGUID()
          Accessor for the message guid.
 int getPort()
          Accessor for the port of the host sending the reply.
 java.util.Set getPushProxies()
          Returns the Set of push proxies, which can be empty.
 int getQuality()
          Accessor for the quality of results returned from this host, based on firewalled status, whether or not it has upload slots, etc.
 int getSpeed()
          Accessor for the speed (bandwidth) of the remote host.
 java.lang.String getVendorCode()
          Accessor for the vendor code of the host.
 boolean isBrowseHostEnabled()
          Returns whether or not the remote host has browse host enabled.
 boolean isBusy()
          Returns whether or not the remote host is busy.
 boolean isChatEnabled()
          Returns whether or not the remote host has chat enabled.
 boolean isFirewalled()
          Returns whether or not the remote host is firewalled.
 boolean isMeasuredSpeed()
          Returns whether or not the remote host is reporting a speed that has been measured by the application, as opposed to simply selected by the user..
 boolean isReplyToMulticastQuery()
          Returns whether or not this was a response to a multicast query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostData

public HostData(QueryReply reply)
Constructs a new HostData instance from a QueryReply.

Parameters:
reply - the QueryReply instance from which host data should be extracted.
Method Detail

getClientGUID

public byte[] getClientGUID()
Accessor for the client guid for the host.

Returns:
the host's client guid

getVendorCode

public java.lang.String getVendorCode()
Accessor for the vendor code of the host.

Returns:
the host's vendor code

getMessageGUID

public byte[] getMessageGUID()
Accessor for the message guid.

Returns:
the message guid

getSpeed

public int getSpeed()
Accessor for the speed (bandwidth) of the remote host.

Returns:
the speed of the remote host

getQuality

public int getQuality()
Accessor for the quality of results returned from this host, based on firewalled status, whether or not it has upload slots, etc.

Returns:
the quality of results returned from the remote host

getIP

public java.lang.String getIP()
Accessor for the ip address of the host sending the reply.

Returns:
the ip address for the replying host

getPort

public int getPort()
Accessor for the port of the host sending the reply.

Returns:
the port of the replying host

isFirewalled

public boolean isFirewalled()
Returns whether or not the remote host is firewalled.

Returns:
true if the remote host is firewalled, otherwise false

isBusy

public boolean isBusy()
Returns whether or not the remote host is busy.

Returns:
true if the remote host is busy, otherwise false

isBrowseHostEnabled

public boolean isBrowseHostEnabled()
Returns whether or not the remote host has browse host enabled.

Returns:
true if the remote host has browse host enabled, otherwise false

isChatEnabled

public boolean isChatEnabled()
Returns whether or not the remote host has chat enabled.

Returns:
true if the remote host has chat enabled, otherwise false

isMeasuredSpeed

public boolean isMeasuredSpeed()
Returns whether or not the remote host is reporting a speed that has been measured by the application, as opposed to simply selected by the user..

Returns:
true if the remote host has as measured speed, otherwise false

isReplyToMulticastQuery

public boolean isReplyToMulticastQuery()
Returns whether or not this was a response to a multicast query.

Returns:
true if this is a response to a multicast query, otherwise false

getPushProxies

public java.util.Set getPushProxies()
Returns the Set of push proxies, which can be empty.

Returns:
a Set of push proxies, which can be empty