net.roarsoftware.lastfm
Class Result

java.lang.Object
  extended by net.roarsoftware.lastfm.Result

public class Result
extends java.lang.Object

The 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.

Author:
Janni Kovacs

Nested Class Summary
static class Result.Status
           
 
Constructor Summary
Result(org.w3c.dom.Document resultDocument)
           
Result(java.lang.String errorMessage)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Result

public Result(org.w3c.dom.Document resultDocument)

Result

public Result(java.lang.String errorMessage)
Method Detail

isSuccessful

public boolean isSuccessful()
Returns if the operation was successful. Same as getStatus() == 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()