net.roarsoftware.lastfm.scrobble
Class ResponseStatus
java.lang.Object
net.roarsoftware.lastfm.scrobble.ResponseStatus
public class ResponseStatus
- extends java.lang.Object
Contains information about the result of a scrobbling operation and an optional error message.
- Author:
- Janni Kovacs
Method Summary |
java.lang.String |
getMessage()
Returns the optional error message, which is only available if status is FAILED , or
null , if no message is available. |
int |
getStatus()
Returns the result status code of the operation, which is one of the integer constants defined in this class. |
boolean |
ok()
Returns true if the operation was successful. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OK
public static final int OK
- See Also:
- Constant Field Values
BANNED
public static final int BANNED
- See Also:
- Constant Field Values
BADAUTH
public static final int BADAUTH
- See Also:
- Constant Field Values
BADTIME
public static final int BADTIME
- See Also:
- Constant Field Values
BADSESSION
public static final int BADSESSION
- See Also:
- Constant Field Values
FAILED
public static final int FAILED
- See Also:
- Constant Field Values
ResponseStatus
public ResponseStatus(int status)
ResponseStatus
public ResponseStatus(int status,
java.lang.String message)
getMessage
public java.lang.String getMessage()
- Returns the optional error message, which is only available if
status
is FAILED
, or
null
, if no message is available.
- Returns:
- the error message or
null
getStatus
public int getStatus()
- Returns the result status code of the operation, which is one of the integer constants defined in this class.
- Returns:
- the status code
ok
public boolean ok()
- Returns
true
if the operation was successful. Same as getStatus() == ResponseStatus.OK
.
- Returns:
true
if status is OK