net.datacrow.core.services
Interface IOnlineSearchClient

All Known Implementing Classes:
MusicFile, OnlineSearchForm, OnlineSearchHelper

public interface IOnlineSearchClient

Classes implementing this interface can be notified by the online search tasks about events and retrieved results.

Author:
Robert Jan van der Waals

Method Summary
 void addError(java.lang.String message)
          Passes an error message to this client.
 void addError(java.lang.Throwable t)
          Passes an error to this client.
 void addMessage(java.lang.String message)
          Passes a message to this client.
 void addObject(DcObject dco)
          Passes a result / item to this client.
 void addWarning(java.lang.String warning)
          Passes a warning message to this client.
 DcModule getModule()
          Returns the current module.
 void processed(int i)
          The current result number being processed (x of x).
 void processing()
          Indicates a task is currently running.
 void processingTotal(int i)
          Passes the count of results which are going to be processed.
 int resultCount()
          Returns the total count of added items (see addObject(DcObject))
 void stopped()
          Indicates a task has been stopped and a new task can be started.
 

Method Detail

addObject

void addObject(DcObject dco)
Passes a result / item to this client.

Parameters:
dco -

processing

void processing()
Indicates a task is currently running.


stopped

void stopped()
Indicates a task has been stopped and a new task can be started.


addMessage

void addMessage(java.lang.String message)
Passes a message to this client.

Parameters:
message -

addError

void addError(java.lang.Throwable t)
Passes an error to this client.

Parameters:
t -

addError

void addError(java.lang.String message)
Passes an error message to this client.

Parameters:
t -

addWarning

void addWarning(java.lang.String warning)
Passes a warning message to this client.

Parameters:
t -

resultCount

int resultCount()
Returns the total count of added items (see addObject(DcObject))


getModule

DcModule getModule()
Returns the current module.

Returns:
The module

processingTotal

void processingTotal(int i)
Passes the count of results which are going to be processed. This way the client knows how many items to expect.

Parameters:
i - The total count.

processed

void processed(int i)
The current result number being processed (x of x).

Parameters:
i -