|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.limegroup.gnutella.licenses.AbstractLicense
public abstract class AbstractLicense
A base license class, implementing common functionality.
| Field Summary | |
|---|---|
protected URI |
licenseLocation
The URI where verification will be performed. |
protected int |
verified
Whether or not this license has been verified. |
| Fields inherited from interface com.limegroup.gnutella.licenses.License |
|---|
NO_LICENSE, UNVERIFIED, VERIFIED, VERIFYING |
| Method Summary | |
|---|---|
protected abstract void |
clear()
Clears all internal state that could be set while verifying. |
protected String |
getBody(String url,
LimeHttpClient httpClient)
Retrieves the body of a URL from a webserver. |
protected String |
getBodyFromURL(String url,
LimeHttpClient httpClient)
Contacts the given URL and downloads returns the body of the HTTP request. |
long |
getLastVerifiedTime()
Returns the last time this license was verified. |
String |
getLicenseName()
Gets the name of this license. |
URI |
getLicenseURI()
Returns a URI that the user can visit to manually verify. |
boolean |
isVerified()
True if this license has been externally verified. |
boolean |
isVerifying()
True if this license is currently being or in queue for verification. |
protected abstract void |
parseDocumentNode(Node node,
LicenseCache licenseCache,
LimeHttpClient httpClient)
Parses the document node of the XML. |
protected void |
parseXML(String xml,
LicenseCache licenseCache,
LimeHttpClient httpClient)
Attempts to parse the given XML. |
void |
setLicenseName(String name)
|
void |
verify(LicenseCache licenseCache,
LimeHttpClient httpClient)
Verifies the license. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.limegroup.gnutella.licenses.License |
|---|
copy, getLicense, getLicenseDeed, getLicenseDescription, isValid |
| Field Detail |
|---|
protected transient int verified
protected transient URI licenseLocation
| Method Detail |
|---|
public void setLicenseName(String name)
setLicenseName in interface MutableLicensepublic boolean isVerifying()
License
isVerifying in interface Licensepublic boolean isVerified()
License
isVerified in interface Licensepublic String getLicenseName()
License
getLicenseName in interface Licensepublic URI getLicenseURI()
License
getLicenseURI in interface Licensepublic long getLastVerifiedTime()
License
getLastVerifiedTime in interface Licenseprotected abstract void clear()
protected String getBody(String url,
LimeHttpClient httpClient)
protected String getBodyFromURL(String url,
LimeHttpClient httpClient)
protected abstract void parseDocumentNode(Node node,
LicenseCache licenseCache,
LimeHttpClient httpClient)
protected void parseXML(String xml,
LicenseCache licenseCache,
LimeHttpClient httpClient)
public void verify(LicenseCache licenseCache,
LimeHttpClient httpClient)
LicenseLicense.isValid(URN).
verify in interface License
|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||