|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.command.registrar.RemoteCommandRegistrarConnection
public class RemoteCommandRegistrarConnection
Interacts with the command registrar that is available to all processes.
| Constructor Summary | ||
|---|---|---|
RemoteCommandRegistrarConnection()
Creates a RemoteCommandRegistrarConnection instance. |
||
| 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 using its command handler and associated metadata. |
|
void |
unregisterCommand(String commandId)
Unregister the command with a given command identifier. |
|
void |
unregisterCommandCategory(String commandCategory)
Unregister all commands belonging to a given category. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RemoteCommandRegistrarConnection()
RemoteCommandRegistrarConnection instance.
| Method Detail |
|---|
public Command getCommand(CommandRequest request)
Command instance that matches specified criteria.
getCommand in interface CommandRegistrarConnectionrequest - Criteria used to obtain commands.
null if there are no matching commands.public Command[] getCommands(CommandRequest request)
Command instances that match specified criteria.
getCommands in interface CommandRegistrarConnectionrequest - Criteria used to obtain commands.
public Command[] getCommands(CommandRequest request,
int maximumNumberOfCommands)
Command instances that match specified criteria.
getCommands in interface CommandRegistrarConnectionrequest - Criteria used to obtain commands.maximumNumberOfCommands - Maximum number of commands to return.
public void registerCommand(CommandHandler handler,
CommandMetadata metadata)
registerCommand in interface CommandRegistrarConnectionhandler - The command handler.metadata - The command metadata.
RegistrationException - If metadata is null or metadata with same id has already been registered.public void unregisterCommand(String commandId)
Commands can only be unregistered by the module that registered them.
commandId - The id of the command to be unregistered.
RegistrationException - If commandId is null,
or registered command with given id does not exist,
or current module did not register command with given id.public void unregisterCommandCategory(String commandCategory)
Only commands registered by the calling module will be affected.
commandCategory - Commands belonging to this category will be unregistered.
RegistrationException - If commandCategory is null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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