private HistoryKey createHistoryKey(JmxRequest pJmxReq, String pBeanName, String pAttrName, String pPath) { HistoryKey key; try { String target = pJmxReq.getTargetConfig() != null ? pJmxReq.getTargetConfig().getUrl() : null; key = new HistoryKey(pBeanName, pAttrName, pPath,target); } catch (MalformedObjectNameException e) { // Shouldn't occur since we get the MBeanName from a JMX operation's result. However, // we will rethrow it just in case throw new IllegalArgumentException("Can not parse MBean name " + pBeanName,e); } return key; }
private JMXConnector createConnector(JmxRequest pJmxReq) throws IOException { ProxyTargetConfig targetConfig = pJmxReq.getTargetConfig(); if (targetConfig == null) { throw new IllegalArgumentException("No proxy configuration in request " + pJmxReq); } String urlS = targetConfig.getUrl(); if (!acceptTargetUrl(urlS)) { throw new SecurityException(String.format("Target URL %s is not allowed by configuration", urlS)); } JMXServiceURL url = new JMXServiceURL(urlS); Map<String,Object> env = prepareEnv(targetConfig.getEnv()); return JMXConnectorFactory.newJMXConnector(url,env); }
private void init(JmxObjectNameRequest pJmxReq) { if (pJmxReq.getObjectNameAsString() == null) { throw new IllegalArgumentException("MBean name must not be null"); } if (pJmxReq.getObjectName().isPattern()) { throw new IllegalArgumentException("MBean name must not be a pattern"); } if (pJmxReq.getTargetConfig() != null) { target = pJmxReq.getTargetConfig().getUrl(); } mBean = pJmxReq.getObjectName(); }
private HistoryKey createHistoryKey(JmxRequest pJmxReq, String pBeanName, String pAttrName, String pPath) { HistoryKey key; try { String target = pJmxReq.getTargetConfig() != null ? pJmxReq.getTargetConfig().getUrl() : null; key = new HistoryKey(pBeanName, pAttrName, pPath,target); } catch (MalformedObjectNameException e) { // Shouldn't occur since we get the MBeanName from a JMX operation's result. However, // we will rethrow it just in case throw new IllegalArgumentException("Can not parse MBean name " + pBeanName,e); } return key; }
private HistoryKey createHistoryKey(JmxRequest pJmxReq, String pBeanName, String pAttrName, String pPath) { HistoryKey key; try { String target = pJmxReq.getTargetConfig() != null ? pJmxReq.getTargetConfig().getUrl() : null; key = new HistoryKey(pBeanName, pAttrName, pPath,target); } catch (MalformedObjectNameException e) { // Shouldn't occur since we get the MBeanName from a JMX operation's result. However, // we will rethrow it just in case throw new IllegalArgumentException("Can not parse MBean name " + pBeanName,e); } return key; }
private JMXConnector createConnector(JmxRequest pJmxReq) throws IOException { ProxyTargetConfig targetConfig = pJmxReq.getTargetConfig(); if (targetConfig == null) { throw new IllegalArgumentException("No proxy configuration in request " + pJmxReq); } String urlS = targetConfig.getUrl(); if (!acceptTargetUrl(urlS)) { throw new SecurityException(String.format("Target URL %s is not allowed by configuration", urlS)); } JMXServiceURL url = new JMXServiceURL(urlS); Map<String,Object> env = prepareEnv(targetConfig.getEnv()); return JMXConnectorFactory.newJMXConnector(url,env); }
private JMXConnector createConnector(JmxRequest pJmxReq) throws IOException { ProxyTargetConfig targetConfig = pJmxReq.getTargetConfig(); if (targetConfig == null) { throw new IllegalArgumentException("No proxy configuration in request " + pJmxReq); } String urlS = targetConfig.getUrl(); if (!acceptTargetUrl(urlS)) { throw new SecurityException(String.format("Target URL %s is not allowed by configuration", urlS)); } JMXServiceURL url = new JMXServiceURL(urlS); Map<String,Object> env = prepareEnv(targetConfig.getEnv()); return JMXConnectorFactory.newJMXConnector(url,env); }
private void init(JmxObjectNameRequest pJmxReq) { if (pJmxReq.getObjectNameAsString() == null) { throw new IllegalArgumentException("MBean name must not be null"); } if (pJmxReq.getObjectName().isPattern()) { throw new IllegalArgumentException("MBean name must not be a pattern"); } if (pJmxReq.getTargetConfig() != null) { target = pJmxReq.getTargetConfig().getUrl(); } mBean = pJmxReq.getObjectName(); }
private void init(JmxObjectNameRequest pJmxReq) { if (pJmxReq.getObjectNameAsString() == null) { throw new IllegalArgumentException("MBean name must not be null"); } if (pJmxReq.getObjectName().isPattern()) { throw new IllegalArgumentException("MBean name must not be a pattern"); } if (pJmxReq.getTargetConfig() != null) { target = pJmxReq.getTargetConfig().getUrl(); } mBean = pJmxReq.getObjectName(); }