Package de.umass.lastfm
Class Result
- java.lang.Object
-
- de.umass.lastfm.Result
-
- Direct Known Subclasses:
ScrobbleResult
public class Result extends java.lang.ObjectTheResultclass contains the response sent by the server, i.e. the status (either ok or failed), an error code and message if failed and the xml response sent by the server.- Author:
- Janni Kovacs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResult.Status
-
Field Summary
Fields Modifier and Type Field Description protected interrorCodeprotected java.lang.StringerrorMessageprotected inthttpErrorCodeprotected org.w3c.dom.DocumentresultDocumentprotected Result.Statusstatus
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DomElementgetContentElement()intgetErrorCode()java.lang.StringgetErrorMessage()intgetHttpErrorCode()org.w3c.dom.DocumentgetResultDocument()Result.StatusgetStatus()booleanisSuccessful()Returns if the operation was successful.java.lang.StringtoString()
-
-
-
Field Detail
-
status
protected Result.Status status
-
errorMessage
protected java.lang.String errorMessage
-
errorCode
protected int errorCode
-
httpErrorCode
protected int httpErrorCode
-
resultDocument
protected org.w3c.dom.Document resultDocument
-
-
Method Detail
-
isSuccessful
public boolean isSuccessful()
Returns if the operation was successful. Same asgetStatus() == Status.OK.- Returns:
trueif the operation was successful
-
getErrorCode
public int getErrorCode()
-
getHttpErrorCode
public int getHttpErrorCode()
-
getStatus
public Result.Status getStatus()
-
getResultDocument
public org.w3c.dom.Document getResultDocument()
-
getErrorMessage
public java.lang.String getErrorMessage()
-
getContentElement
public DomElement getContentElement()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-