drm.agentbase
Interface IRequest

All Known Implementing Classes:
StaticRequest

public interface IRequest

Interface to handle assync requests.


Field Summary
static int DONE
          To sign ready status.
static int ERROR
          To sign error status.
static int WAITING
          To sign waiting status.
 
Method Summary
 java.lang.Object getInfo(java.lang.String q)
          Implementations can use this function to return additional information about the request.
 long getStartTime()
          Returns the starting date in the format returned by System.currentTimeMillis()
 int getStatus()
          Returns the status.
 java.lang.Throwable getThrowable()
          If the status is ERROR and the problem was catching a throwable object then returns the corresponding throwable object.
 

Field Detail

WAITING

public static final int WAITING
To sign waiting status.

DONE

public static final int DONE
To sign ready status.

ERROR

public static final int ERROR
To sign error status.
Method Detail

getStatus

public int getStatus()
Returns the status. Either WAITING, DONE or ERROR.

getStartTime

public long getStartTime()
Returns the starting date in the format returned by System.currentTimeMillis()

getThrowable

public java.lang.Throwable getThrowable()
If the status is ERROR and the problem was catching a throwable object then returns the corresponding throwable object. If the status is not ERROR or the error was not due to a Throwable then returns null.

getInfo

public java.lang.Object getInfo(java.lang.String q)
Implementations can use this function to return additional information about the request.
Parameters:
q - the string id of the requested information
Returns:
the requested info or null if query is not known