org.dvb.tvanytime.metadata
Interface MetadataChangedListener


public interface MetadataChangedListener

An interface for applications wishing to be informed when revised information becomes available from a metadata service. The scope of the information that is monitored for changes is defined by a DatabaseQueryResult that was returned as the result of a metadata query. Only one of the two methods supported by the interface will ever be called after which monitoring will cease. To obtain the revised metadata, the query which led to the DatabaseQueryResult must be repeated.


Field Summary
static int FAILED
          Value which indicates that the request to monitor changes has been refused.
static int TERMINATED
          Value which indicates that the monitoring of changes has been terminated due to a resource conflict.
 
Method Summary
 void metadataChanged(DatabaseQueryResult document)
          This method is called when a change has occurred in a metadata service that is within the scope of the specified DatabaseQueryResult.
 void requestCancelled(DatabaseQueryResult document, int status)
          This method is called when a request to monitoring of changes in a metadata service has failed or has been terminated.
 

Field Detail

FAILED

static final int FAILED
Value which indicates that the request to monitor changes has been refused.

See Also:
Constant Field Values

TERMINATED

static final int TERMINATED
Value which indicates that the monitoring of changes has been terminated due to a resource conflict.

See Also:
Constant Field Values
Method Detail

metadataChanged

void metadataChanged(DatabaseQueryResult document)
This method is called when a change has occurred in a metadata service that is within the scope of the specified DatabaseQueryResult. This method will only be called once, after which the monitoring of changes will cease.

Parameters:
document - the DatabaseQueryResult which defined the scope of the monitoring request.

requestCancelled

void requestCancelled(DatabaseQueryResult document,
                      int status)
This method is called when a request to monitoring of changes in a metadata service has failed or has been terminated. This method wll be called following a call to DatabaseQueryResult.close().

Parameters:
document - the DatabaseQueryResult which defined the scope of the monitoring request.
status - a value that is set to FAILED or TERMINATED.