@Override public Object execute() throws Exception { getJmsService().delete(name); return null; }
@Override public Object execute() throws Exception { getJmsService().create(name, type, url, username, password, pool); return null; }
@Override public Object execute() throws Exception { getJmsService().send(connectionFactory, queue, message, replyTo, username, password); return null; }
@Override public Object execute() throws Exception { System.out.println(getJmsService().consume(connectionFactory, queue, selector, username, password) + " message(s) consumed"); return null; }
@Override public Object execute() throws Exception { System.out.println(getJmsService().move(connectionFactory, source, destination, selector, username, password) + " message(s) moved"); return null; }
@Override public List<String> getConnectionfactories() throws MBeanException { try { return jmsService.connectionFactories(); } catch (Throwable t) { throw new MBeanException(null, t.getMessage()); } }
@Override public void create(String name, String type, String url, String username, String password, String pool) throws MBeanException { try { jmsService.create(name, type, url, username, password, pool); } catch (Throwable t) { throw new MBeanException(null, t.getMessage()); } }
@Override public Map<String, String> info(String connectionFactory, String username, String password) throws MBeanException { try { return jmsService.info(connectionFactory, username, password); } catch (Throwable t) { throw new MBeanException(null, t.getMessage()); } }
@Override public List<String> queues(String connectionFactory, String username, String password) throws MBeanException { try { return jmsService.queues(connectionFactory, username, password); } catch (Throwable t) { throw new MBeanException(null, t.getMessage()); } }
@Override public void delete(String name) throws MBeanException { try { jmsService.delete(name); } catch (Throwable t) { throw new MBeanException(null, t.getMessage()); } }
@Override public List<String> topics(String connectionFactory, String username, String password) throws MBeanException { try { return jmsService.topics(connectionFactory, username, password); } catch (Throwable t) { throw new MBeanException(null, t.getMessage()); } }
@Override public int count(String connectionFactory, String queue, String username, String password) throws MBeanException { try { return jmsService.count(connectionFactory, queue, username, password); } catch (Throwable t) { throw new MBeanException(null, t.getMessage()); } }
@Override public int consume(String connectionFactory, String queue, String selector, String username, String password) throws MBeanException { try { return jmsService.consume(connectionFactory, queue, selector, username, password); } catch (Throwable t) { throw new MBeanException(null, t.getMessage()); } }
@Override public int move(String connectionFactory, String source, String destination, String selector, String username, String password) throws MBeanException { try { return jmsService.move(connectionFactory, source, destination, selector, username, password); } catch (Throwable t) { throw new MBeanException(null, t.getMessage()); } }
public JmsMessage(Message message) { try { initFromMessage(message); } catch (JMSException e) { throw new RuntimeException(e.getMessage(), e); } }
public Object doExecute() throws Exception { getJmsService().delete(name); return null; }
public Object doExecute() throws Exception { getJmsService().create(name, type, url, username, password); return null; }
public Object doExecute() throws Exception { getJmsService().send(connectionFactory, queue, message, replyTo, username, password); return null; }
@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 void create(String name, String type, String url) throws MBeanException { try { jmsService.create(name, type, url); } catch (Throwable t) { throw new MBeanException(null, t.getMessage()); } }