Java Code Examples for javax.management.remote.JMXServiceURL#getURLPath()
The following examples show how to use
javax.management.remote.JMXServiceURL#getURLPath() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RMIConnector.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 2
Source File: RMIConnector.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 3
Source File: RMIConnector.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 4
Source File: RMIConnector.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 5
Source File: RMIConnector.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 6
Source File: RMIConnector.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 7
Source File: RMIConnector.java From hottub with GNU General Public License v2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 8
Source File: RMIConnector.java From Java8CN with Apache License 2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 9
Source File: RMIConnector.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 10
Source File: RMIConnector.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment); else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 11
Source File: RMIConnector.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 12
Source File: RMIConnector.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 13
Source File: RMIConnector.java From JDKSourceCode1.8 with MIT License | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 14
Source File: RMIConnector.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 15
Source File: RMIConnector.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 16
Source File: RMIConnector.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
private RMIServer findRMIServer(JMXServiceURL directoryURL, Map<String, Object> environment) throws NamingException, IOException { final boolean isIiop = RMIConnectorServer.isIiopURL(directoryURL,true); if (isIiop) { // Make sure java.naming.corba.orb is in the Map. environment.put(EnvHelp.DEFAULT_ORB,resolveOrb(environment)); } String path = directoryURL.getURLPath(); int end = path.indexOf(';'); if (end < 0) end = path.length(); if (path.startsWith("/jndi/")) return findRMIServerJNDI(path.substring(6,end), environment, isIiop); else if (path.startsWith("/stub/")) return findRMIServerJRMP(path.substring(6,end), environment, isIiop); else if (path.startsWith("/ior/")) { if (!IIOPHelper.isAvailable()) throw new IOException("iiop protocol not available"); return findRMIServerIIOP(path.substring(5,end), environment, isIiop); } else { final String msg = "URL path must begin with /jndi/ or /stub/ " + "or /ior/: " + path; throw new MalformedURLException(msg); } }
Example 17
Source File: JMXProviderUtils.java From scheduling with GNU Affero General Public License v3.0 | 3 votes |
/** * Extracts an URI from a JMXServiceURL address such as: * <code>service:jmx:<em>protocol</em>:///jndi/<em>uri</em></code> * * @param jmxServiceURL the address that contains the uri * @return an URI extracted from the address * @throws MalformedURLException If the address is incorrect */ public static URI extractURI(final JMXServiceURL jmxServiceURL) throws MalformedURLException { final String path = jmxServiceURL.getURLPath(); if (!path.startsWith(JMXProviderUtils.JNDI_CONTEXT)) { throw new MalformedURLException("Incorrect URL form " + path); } return URI.create(path.substring(JMXProviderUtils.JNDI_CONTEXT.length())); }