com.limegroup.gnutella.bootstrap
Class BootstrapServer

java.lang.Object
  extended bycom.limegroup.gnutella.bootstrap.BootstrapServer

public class BootstrapServer
extends java.lang.Object

A URL for a GWebCache endpoint, plus some additional connection history data:

Written to and read from gnutella.net.

See Also:
GWebCache, HostCatcher

Constructor Summary
BootstrapServer(java.lang.String s)
          Constructs a new BootstrapServer from a URL or an extended gnutella.net data line.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true if o is a BootStrapServer with the same URL.
 java.net.URL getURL()
          Returns the URL to the server, minus any request parameters.
 java.lang.String toString()
          Returns a parsable represenation of this.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BootstrapServer

public BootstrapServer(java.lang.String s)
                throws java.text.ParseException
Constructs a new BootstrapServer from a URL or an extended gnutella.net data line.

Parameters:
s - single line of the form "http://server.com/path/to/script" or or "http://server.com/path/to/script,dtime,ctimes,ftimes". In the extended format, "dtime" is the host discovery time, ctimes is a semicolon separated list of successful connect times, and ftimes is semicolon separated list of unsuccessful connect times.
Throws:
java.text.ParseException - line could not be be parsed in either format. The offset is not necessarily set.
Method Detail

getURL

public java.net.URL getURL()
Returns the URL to the server, minus any request parameters. This is guaranteed to be non-null.


toString

public java.lang.String toString()
Returns a parsable represenation of this. This can be reconstructed by constructing a new BootstrapServer with the returned string as an argument. Does not include any end-of-line characters.


equals

public boolean equals(java.lang.Object o)
Returns true if o is a BootStrapServer with the same URL.