예제 #1
0
 public HelpCommand(SessionFactory factory) {
   Registry registry = factory.getRegistry();
   registry.register(this);
   registry.register(new SimpleHelpProvider());
   registry.register(new CommandListHelpProvider());
   registry.register(new SingleCommandHelpProvider());
 }
예제 #2
0
 private void unregister(final Registry registry, final CommandWrapper wrapper) {
   try {
     registry.unregister(wrapper);
   } catch (final Exception ex) {
     logger.error("Cannot unregister command '{}'.", wrapper, ex);
   }
 }