@Override public List<String> getConnectionfactories() throws MBeanException { try { return jmsService.connectionFactories(); } catch (Throwable t) { throw new MBeanException(null, t.getMessage()); } }
@Override public int complete(Session session, CommandLine commandLine, List<String> candidates) { StringsCompleter delegate = new StringsCompleter(); try { for (String connectionFactory : jmsService.connectionFactories()) { delegate.getStrings().add(connectionFactory); } } catch (Exception e) { // nothing to do } return delegate.complete(session, commandLine, candidates); }
@Override public int complete(String buffer, int cursor, List<String> candidates) { StringsCompleter delegate = new StringsCompleter(); try { for (String connectionFactory : jmsService.connectionFactories()) { delegate.getStrings().add(connectionFactory); } } catch (Exception e) { // nothing to do } return delegate.complete(buffer, cursor, candidates); }
@Override public Object execute() throws Exception { ShellTable table = new ShellTable(); table.column("JMS Connection Factory"); List<String> connectionFactories = getJmsService().connectionFactories(); for (String connectionFactory : connectionFactories) { table.addRow().addContent(connectionFactory); } table.print(System.out); return null; }
public Object doExecute() throws Exception { ShellTable table = new ShellTable(); table.column("JMS Connection Factory"); List<String> connectionFactories = getJmsService().connectionFactories(); for (String connectionFactory : connectionFactories) { table.addRow().addContent(connectionFactory); } table.print(System.out); return null; }