Package de.umass.lastfm
Class Result
- java.lang.Object
-
- de.umass.lastfm.Result
-
- Direct Known Subclasses:
ScrobbleResult
public class Result extends java.lang.Object
TheResult
class 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 class
Result.Status
-
Field Summary
Fields Modifier and Type Field Description protected int
errorCode
protected java.lang.String
errorMessage
protected int
httpErrorCode
protected org.w3c.dom.Document
resultDocument
protected Result.Status
status
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DomElement
getContentElement()
int
getErrorCode()
java.lang.String
getErrorMessage()
int
getHttpErrorCode()
org.w3c.dom.Document
getResultDocument()
Result.Status
getStatus()
boolean
isSuccessful()
Returns if the operation was successful.java.lang.String
toString()
-
-
-
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:
true
if 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:
toString
in classjava.lang.Object
-
-