@Test public final void testTeiidURL() throws Exception { String SERVER_URL = "mm: assertTrue(TeiidURL.isValidServerURL(SERVER_URL)); TeiidURL url = new TeiidURL(SERVER_URL); List hosts = url.getHostInfo(); assertNotNull("MMURL should have 1 Host", hosts ); assertEquals(1,hosts.size()); }
public TeiidURL(String serverURL) throws MalformedURLException { if (serverURL == null) { throw new MalformedURLException(INVALID_FORMAT_SERVER); } if (StringUtil.startsWithIgnoreCase(serverURL, SECURE_PROTOCOL)) { usingSSL = true; } else if (!StringUtil.startsWithIgnoreCase(serverURL, DEFAULT_PROTOCOL)) { throw new MalformedURLException(INVALID_FORMAT_SERVER); } appServerURL = serverURL; parseServerURL(serverURL.substring(usingSSL?SECURE_PROTOCOL.length():DEFAULT_PROTOCOL.length()), INVALID_FORMAT_SERVER); }
TeiidURL { public TeiidURL(String serverURL) throws MalformedURLException { if (serverURL == null) { throw new MalformedURLException(INVALID_FORMAT_SERVER); } if (StringUtil.startsWithIgnoreCase(serverURL, SECURE_PROTOCOL)) { usingSSL = true; } else if (!StringUtil.startsWithIgnoreCase(serverURL, DEFAULT_PROTOCOL)) { throw new MalformedURLException(INVALID_FORMAT_SERVER); } appServerURL = serverURL; parseServerURL(serverURL.substring(usingSSL?SECURE_PROTOCOL.length():DEFAULT_PROTOCOL.length()), INVALID_FORMAT_SERVER); } }
TeiidURL { public TeiidURL(String serverURL) throws MalformedURLException { if (serverURL == null) { throw new MalformedURLException(INVALID_FORMAT_SERVER); } if (StringUtil.startsWithIgnoreCase(serverURL, SECURE_PROTOCOL)) { usingSSL = true; } else if (!StringUtil.startsWithIgnoreCase(serverURL, DEFAULT_PROTOCOL)) { throw new MalformedURLException(INVALID_FORMAT_SERVER); } appServerURL = serverURL; parseServerURL(serverURL.substring(usingSSL?SECURE_PROTOCOL.length():DEFAULT_PROTOCOL.length()), INVALID_FORMAT_SERVER); } TeiidURL(String serverURL);  TeiidURL(String host, int port, boolean secure); }
TeiidURL { public TeiidURL(String serverURL) throws MalformedURLException { if (serverURL == null) { throw new MalformedURLException(INVALID_FORMAT_SERVER); } if (StringUtil.startsWithIgnoreCase(serverURL, SECURE_PROTOCOL)) { usingSSL = true; } else if (!StringUtil.startsWithIgnoreCase(serverURL, DEFAULT_PROTOCOL)) { throw new MalformedURLException(INVALID_FORMAT_SERVER); } appServerURL = serverURL; parseServerURL(serverURL.substring(usingSSL?SECURE_PROTOCOL.length():DEFAULT_PROTOCOL.length()), INVALID_FORMAT_SERVER); } TeiidURL(String serverURL);  TeiidURL(String host, int port, boolean secure); static boolean isValidServerURL(String serverURL); List<HostInfo> getHostInfo(); String getHosts(); String getPorts(); static int validatePort(String port); static String validatePort(int portNumber); String getAppServerURL(); String toString(); boolean equals(Object obj); int hashCode(); boolean isUsingSSL(); }
TeiidURL { public TeiidURL(String serverURL) throws MalformedURLException { if (serverURL == null) { throw new MalformedURLException(INVALID_FORMAT_SERVER); } if (StringUtil.startsWithIgnoreCase(serverURL, SECURE_PROTOCOL)) { usingSSL = true; } else if (!StringUtil.startsWithIgnoreCase(serverURL, DEFAULT_PROTOCOL)) { throw new MalformedURLException(INVALID_FORMAT_SERVER); } appServerURL = serverURL; parseServerURL(serverURL.substring(usingSSL?SECURE_PROTOCOL.length():DEFAULT_PROTOCOL.length()), INVALID_FORMAT_SERVER); } TeiidURL(String serverURL);  TeiidURL(String host, int port, boolean secure); static boolean isValidServerURL(String serverURL); List<HostInfo> getHostInfo(); String getHosts(); String getPorts(); static int validatePort(String port); static String validatePort(int portNumber); String getAppServerURL(); String toString(); boolean equals(Object obj); int hashCode(); boolean isUsingSSL(); static final String DOT_DELIMITER; static final String DOUBLE_SLASH_DELIMITER; static final String COMMA_DELIMITER; static final String COLON_DELIMITER; static final String BACKSLASH_DELIMITER; static final String DEFAULT_PROTOCOL; static final String SECURE_PROTOCOL; static final String INVALID_FORMAT_SERVER; }