net.rim.device.api.command.registrar
Interface CommandRegistrarConnection

All Known Implementing Classes:
LocalCommandRegistrarConnection, RemoteCommandRegistrarConnection

public interface CommandRegistrarConnection

Implement this interface to interact with command registrar instances.

The getCommand() and getCommands() methods return Command instances, which bind a command's CommandHandler and its associated metadata, allowing for manipulation of commands by users.

Since:
BlackBerry API 6.0.0

Method Summary
 Command getCommand(CommandRequest request)
          Returns a Command instance that matches specified criteria.
 Command[] getCommands(CommandRequest request)
          Returns an array of Command instances that match specified criteria.
 Command[] getCommands(CommandRequest request, int maximumNumberOfCommands)
          Returns an array of Command instances that match specified criteria.
 void registerCommand(CommandHandler handler, CommandMetadata metadata)
          Registers a command's handler and its associated metadata.
 



Method Detail

getCommand

Command getCommand(CommandRequest request)
Returns a Command instance that matches specified criteria.

Parameters:
request - Criteria used to obtain commands.
Returns:
Command instance that matches criteria. Only one instance is returned even if there are multiple matches. Returns null if there are no matching commands.
Since:
BlackBerry API 6.0.0

getCommands

Command[] getCommands(CommandRequest request)
Returns an array of Command instances that match specified criteria.

Parameters:
request - Criteria used to obtain commands.
Returns:
Command instances that match criteria. Returns an empty array if no matches are found.
Since:
BlackBerry API 6.0.0

getCommands

Command[] getCommands(CommandRequest request,
                      int maximumNumberOfCommands)
Returns an array of Command instances that match specified criteria.

Parameters:
request - Criteria used to obtain commands.
maximumNumberOfCommands - Maximum number of commands to return.
Returns:
Command instances that match criteria. Returns an empty array if no matches are found.
Since:
BlackBerry API 6.0.0

registerCommand

void registerCommand(CommandHandler handler,
                     CommandMetadata metadata)
Registers a command's handler and its associated metadata.

Parameters:
handler - The command handler.
metadata - The command metadata.
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.