net.rim.device.api.unifiedsearch.query
Interface NotificationListener


public interface NotificationListener

Defines the behavior an application should implement to receive notifications about search operations. All methods in this class return an Object (except error()). Compare resultType to the constants defined in this class to determine what type of object the Unified Search Framework returns.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

Field Summary
Category: Signed static int TYPE_SEARCHABLE
          The object returned is a Searchable.
Category: Signed static int TYPE_SEARCH_RESPONSE
          Used if the object being passed is a SearchResponse.
 
Method Summary
Category: Signed  void completed(Object results, int resultType)
          Notifies the listener that the search operation is complete.
Category: Signed  void error(Exception exception)
          Notifies the listener that the Unified Search Framework encountered a problem while attempting the requested search.
Category: Signed  void partiallyCompleted(Object results, Exception exception, int resultType)
          Notifies the listener that a partial search result is available in results.
Category: Signed  void update(Object results, int resultType)
          Updates the listener with a set of matching objects.
 



Field Detail

TYPE_SEARCHABLE

static final int TYPE_SEARCHABLE
The object returned is a Searchable.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

TYPE_SEARCH_RESPONSE

static final int TYPE_SEARCH_RESPONSE
Used if the object being passed is a SearchResponse. This will always be the case if a UnifiedSearchField is used to perform searches.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 7.0.0


Method Detail

update

void update(Object results,
            int resultType)
Updates the listener with a set of matching objects. The operation may still be active.

Parameters:
results - The partial search result.
resultType - The type of result returned. See the constants defined in NotificationListener for a list of result types.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

completed

void completed(Object results,
               int resultType)
Notifies the listener that the search operation is complete.

Parameters:
results - The search result.
resultType - The type of result returned. See the constants defined in NotificationListener for a list of result types.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

partiallyCompleted

void partiallyCompleted(Object results,
                        Exception exception,
                        int resultType)
Notifies the listener that a partial search result is available in results. The search operation was stopped, paused or interrupted.

Parameters:
results - The partial search result.
exception - The Exception that stopped the search operation; null if the search stopped for any other reason.
resultType - The type of result returned. See the constants defined in NotificationListener for a list of result types.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

error

void error(Exception exception)
Notifies the listener that the Unified Search Framework encountered a problem while attempting the requested search. The Framework provides more information about the problem in the Exception.

Parameters:
exception - The reason that the search operation failed.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal