org.eclipse.ecf.presence.search.message
Interface IMessageSearchManager


public interface IMessageSearchManager

Get a message search mechanism for an account.

Since:
2.0

Method Summary
 ICriteria createCriteria()
          Create a specific criteria for the provider.
 IRestriction createRestriction()
          Create a specific IRestriction implementation for the provider.
 ISearch search(ICriteria criteria)
          Execute the search for a specific criteria, blocking until the search returns.
 void search(ICriteria criteria, IMessageSearchListener listener)
          Execute the search for a specific criteria, not blocking until the search returns.
 

Method Detail

search

ISearch search(ICriteria criteria)
               throws MessageSearchException
Execute the search for a specific criteria, blocking until the search returns. This method can apply search to match the specific criteria in case if the provider is not able to do it completely

Parameters:
criteria - Will not be null.
Returns:
ICriteria Contain the search results.
Throws:
MessageSearchException

search

void search(ICriteria criteria,
            IMessageSearchListener listener)
Execute the search for a specific criteria, not blocking until the search returns. This method can apply search to match the specific criteria in case if the provider is not able to do it completely. The provider is free to call the methods below with an arbitrary thread, so the implementation of these methods must be appropriately prepared.

Parameters:
criteria - ICriteria. Must not be null.
listener - the listener IMessageSearchListener to search. Must not be null.

createCriteria

ICriteria createCriteria()
Create a specific criteria for the provider. Each provider must implement a specific Criteria in a convenient approach for keep, organize and deal with the ICriterion.

Returns:
ICriteria Will not be null

createRestriction

IRestriction createRestriction()
Create a specific IRestriction implementation for the provider. This implementation will provide the methods to created and organize the ICriterion that composes the search. The Restriction is a simple implementation of this, but subclasses or new implementation may be created as appropriate.

Returns:
IRestriction Will not be null