de.umass.lastfm.scrobble
Class ResponseStatus

java.lang.Object
  extended by de.umass.lastfm.scrobble.ResponseStatus

Deprecated. The 1.2.x scrobble protocol has now been deprecated in favour of the 2.0 protocol which is part of the Last.fm web services API.

@Deprecated
public class ResponseStatus
extends Object

Contains information about the result of a scrobbling operation and an optional error message.

Author:
Janni Kovacs
See Also:
ScrobbleResult, Track.scrobble(ScrobbleData, de.umass.lastfm.Session)

Field Summary
static int BADAUTH
          Deprecated.  
static int BADSESSION
          Deprecated.  
static int BADTIME
          Deprecated.  
static int BANNED
          Deprecated.  
static int FAILED
          Deprecated.  
static int OK
          Deprecated.  
 
Constructor Summary
ResponseStatus(int status)
          Deprecated.  
ResponseStatus(int status, String message)
          Deprecated.  
 
Method Summary
 String getMessage()
          Deprecated. Returns the optional error message, which is only available if status is FAILED, or null, if no message is available.
 int getStatus()
          Deprecated. Returns the result status code of the operation, which is one of the integer constants defined in this class.
 boolean ok()
          Deprecated. 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
 

Field Detail

OK

public static final int OK
Deprecated. 
See Also:
Constant Field Values

BANNED

public static final int BANNED
Deprecated. 
See Also:
Constant Field Values

BADAUTH

public static final int BADAUTH
Deprecated. 
See Also:
Constant Field Values

BADTIME

public static final int BADTIME
Deprecated. 
See Also:
Constant Field Values

BADSESSION

public static final int BADSESSION
Deprecated. 
See Also:
Constant Field Values

FAILED

public static final int FAILED
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

ResponseStatus

public ResponseStatus(int status)
Deprecated. 

ResponseStatus

public ResponseStatus(int status,
                      String message)
Deprecated. 
Method Detail

getMessage

public String getMessage()
Deprecated. 
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()
Deprecated. 
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()
Deprecated. 
Returns true if the operation was successful. Same as getStatus() == ResponseStatus.OK.

Returns:
true if status is OK