de.umass.lastfm
public class Result extends Object
Result
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.Modifier and Type | Class and Description |
---|---|
static class |
Result.Status |
Modifier and Type | Field and Description |
---|---|
protected int |
errorCode |
protected String |
errorMessage |
protected int |
httpErrorCode |
protected Document |
resultDocument |
protected Result.Status |
status |
Modifier | Constructor and Description |
---|---|
protected |
Result() |
|
Result(Document resultDocument) |
|
Result(String errorMessage) |
Modifier and Type | Method and Description |
---|---|
DomElement |
getContentElement() |
int |
getErrorCode() |
String |
getErrorMessage() |
int |
getHttpErrorCode() |
Document |
getResultDocument() |
Result.Status |
getStatus() |
boolean |
isSuccessful()
Returns if the operation was successful.
|
String |
toString() |
protected Result.Status status
protected String errorMessage
protected int errorCode
protected int httpErrorCode
protected Document resultDocument
protected Result()
public Result(Document resultDocument)
public Result(String errorMessage)
public boolean isSuccessful()
getStatus() == Status.OK
.true
if the operation was successfulpublic int getErrorCode()
public int getHttpErrorCode()
public Result.Status getStatus()
public Document getResultDocument()
public String getErrorMessage()
public DomElement getContentElement()