*/
private static void registerCommand(final CommandHandler handler,
final String id, final String[] commandCategories,
final String[] contextCategories, final String classname) {
// Initialize CommandMetadata
final CommandMetadata metadata = new CommandMetadata(id);
metadata.setCommandCategories(new CategoryCollection(commandCategories));
metadata.setContextCategories(new CategoryCollection(contextCategories));
if (classname != null) {
metadata.setClassname(classname);
}
// Register the CommandHandler and CommandMetadata with
// LocalCommandRegistrarConnection
final LocalCommandRegistrarConnection connection =