org.dvb.tvanytime.metadata
Interface ResultListener


public interface ResultListener

An interface for applications that wish to listen for changes to a DatabaseQueryResult.


Field Summary
static int REQUEST_COMPLETED
          The request has completed without errors.
static int REQUEST_FAILED
          The request has failed due to an error and the result is empty.
static int RESPONSE_INCOMPLETE
          Result is partially complete because the response was terminated due to an error.
static int RESPONSE_TRUNCATED
          Request has completed without errors but the result has been truncated due to restrictions applied by the implementation.
 
Method Summary
 void databaseResultAdded(DatabaseQueryResult document, Element element)
          This method is called to inform a listener that an element has been added to a DatabaseQueryResult.
 void notifyFinished(DatabaseQueryResult document, int status)
          This method is called to inform a listener that all the callbacks arising from a GetMetadata or a GetSchedule request have been completed.
 

Field Detail

REQUEST_COMPLETED

static final int REQUEST_COMPLETED
The request has completed without errors.

See Also:
Constant Field Values

REQUEST_FAILED

static final int REQUEST_FAILED
The request has failed due to an error and the result is empty.

See Also:
Constant Field Values

RESPONSE_INCOMPLETE

static final int RESPONSE_INCOMPLETE
Result is partially complete because the response was terminated due to an error.

See Also:
Constant Field Values

RESPONSE_TRUNCATED

static final int RESPONSE_TRUNCATED
Request has completed without errors but the result has been truncated due to restrictions applied by the implementation.

See Also:
Constant Field Values
Method Detail

databaseResultAdded

void databaseResultAdded(DatabaseQueryResult document,
                         Element element)
This method is called to inform a listener that an element has been added to a DatabaseQueryResult.

Parameters:
document - the DatabaseQueryResult that has been affected
element - the element that has been added. For example this could be a ProgramInformation element which would signify that metadata for a CRID has been added to the document.

notifyFinished

void notifyFinished(DatabaseQueryResult document,
                    int status)
This method is called to inform a listener that all the callbacks arising from a GetMetadata or a GetSchedule request have been completed.

Parameters:
document - The document that has been updated
status - an int value that indicate the success or otherwise of the original request.