@Override @UriParser public void setUri(String uri) { Matcher matcher = URI_PATTERN.matcher(uri); if (matcher.matches()) { path = matcher.group(1); } else { throw new RuntimeException("invalid archive URI"); } }
@UriParser public void setUri(String uri) { Matcher matcher = URI_PATTERN.matcher(uri); if (matcher.matches()) { path = matcher.group(1); } else { throw new RuntimeException("invalid file URI"); } }
@UriParser public void setUri(String uri) { assert uri.startsWith(URI_PREFIX) : "invalid uri " + uri; connectionString = uri.substring(URI_PREFIX.length()); if (!connectionString.startsWith("hpp:")) connectionString = "hpp:" + connectionString; }
@UriParser public void parseUri(String uri) { this.path = uri; }
@UriParser public void setUri(String uri) { Matcher matcher = URI_PATTERN.matcher(uri); if (matcher.matches()) { setServer(matcher.group(1)); setMountPath(matcher.group(2)); } else { throw new RuntimeException("invalid file URI"); } }
@UriParser public void setUri(String uri) { Matcher m = URI_PATTERN.matcher(uri); if (!m.matches()) { throw new ConfigurationException(String.format("URI does not match %s pattern (%s)", URI_PREFIX, PATTERN_DESC)); } if (m.group(1) != null) protocol = Protocol.valueOf(m.group(1).toLowerCase()); host = m.group(4); port = -1; if (m.group(5) != null) port = Integer.parseInt(m.group(5).substring(1)); accessKey = m.group(2); secretKey = m.group(3); bucketName = m.group(6); keyPrefix = m.group(7); if (accessKey == null || secretKey == null || bucketName == null) throw new ConfigurationException("accessKey, secretKey and bucket are required"); }
@UriParser public void setUri(String uri) { Matcher m = URI_PATTERN.matcher(uri); if (!m.matches()) { throw new ConfigurationException(String.format("URI does not match %s pattern (%s)", URI_PREFIX, PATTERN_DESC)); } protocol = Protocol.valueOf(m.group(1).toLowerCase()); hosts = m.group(4).split(","); port = -1; if (m.group(5) != null) port = Integer.parseInt(m.group(5).substring(1)); uid = m.group(2); secret = m.group(3); path = m.group(6); if (hosts[0].length() == 0 || uid == null || secret == null) throw new ConfigurationException("protocol, host[s], uid and secret are required"); }
@UriParser public void setUri(String uri) { Matcher m = URI_PATTERN.matcher(uri);