com.limegroup.gnutella.altlocs
Class AltLocUtils
java.lang.Object
com.limegroup.gnutella.altlocs.AltLocUtils
public class AltLocUtils
- extends Object
Provides utility methods relating to AlternateLocation objects.
|
Method Summary |
static void |
parseAlternateLocations(URN sha1,
String locations,
boolean allowTLS,
AlternateLocationFactory alternateLocationFactory,
Function<AlternateLocation,Void> function)
Parses an http string of alternate locations, passing each parsed
location to the given function. |
static void |
parseAlternateLocations(URN sha1,
String locations,
boolean allowTLS,
AlternateLocationFactory alternateLocationFactory,
Function<AlternateLocation,Void> function,
boolean allowMe)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parseAlternateLocations
public static void parseAlternateLocations(URN sha1,
String locations,
boolean allowTLS,
AlternateLocationFactory alternateLocationFactory,
Function<AlternateLocation,Void> function)
- Parses an http string of alternate locations, passing each parsed
location to the given function.
If either sha1 or locations are null, nothing is done.
- Parameters:
sha1 - The expected sha1 of each location. If mismatched, an AssertionError is thrown.locations - The comma-separated string of alternate locations.allowTLS - Whether or not a tls=# index is allowed.function - The closure-like function that each location is passed to.
parseAlternateLocations
public static void parseAlternateLocations(URN sha1,
String locations,
boolean allowTLS,
AlternateLocationFactory alternateLocationFactory,
Function<AlternateLocation,Void> function,
boolean allowMe)
Copyright © 2009. All Rights Reserved.