List of usage examples for java.net URI create
public static URI create(String str)
From source file:se.vgregion.pubsub.push.impl.DefaultPolledPublisher.java
/** * {@inheritDoc} */ @Override public URI getUrl() { return URI.create(url); }
From source file:another.planet.clutch.util.HttpPatch.java
public HttpPatch(final String uri) { super(); setURI(URI.create(uri)); }
From source file:de.dan_nrw.android.scroid.dao.wallpapers.WallpaperDAO.java
public Wallpaper[] getAvailableWallpapers(Context context) throws WallpaperListReceivingException { try {// w ww . j av a2 s. com String data = this.download(URI.create(context.getString(R.string.galleryUrl)), new TextFileHttpResponseHandler(), MAX_DOWNLOAD_RETRIES); List<Wallpaper> wallpapers = this.wallpaperParser.parse(data); return wallpapers.toArray(new Wallpaper[wallpapers.size()]); } catch (IllegalStateException ex) { throw new WallpaperListReceivingException(context.getString(R.string.receivingException), ex); } catch (IOException ex) { throw new WallpaperListReceivingException(context.getString(R.string.receivingException), ex); } catch (ParseException ex) { throw new WallpaperListReceivingException(context.getString(R.string.parseExceptionText), ex); } }
From source file:com.almende.eve.transport.ws.WsServerTransport.java
/** * Register remote.// ww w . j ava 2 s . c o m * * @param key * the key * @param remote * the remote */ @Override protected void registerRemote(final String id, final Async remote) { final URI key = URI.create("wsclient:" + id); remotes.put(key, remote); }
From source file:ch.iterate.openstack.swift.model.Region.java
public URI getCDNManagementUrl(String container) { return URI.create(this.getCDNManagementUrl() + "/" + encode(container)); }
From source file:es.tid.cosmos.platform.injection.server.Configuration.java
public URI getHdfsUrl() { return URI.create(this.properties.getString(HDFS_URL)); }
From source file:com.netflix.iep.http.ClientConfigTest.java
@Test public void fromUriNiws() { ClientConfig config = ClientConfig.fromUri(archaius, URI.create("niws://foo/bar")); Assert.assertEquals(config.uri().toString(), "/bar"); }
From source file:net.sf.taverna.t2.activities.externaltool.ExternalToolActivityFactory.java
@Override public URI getActivityType() { return URI.create(ExternalToolActivity.URI); }
From source file:com.measurence.sdk.android.api_subscriptions.MeasurenceAPISubscriptions.java
private URI createSubscriptionURI(HttpPostSubscription httpPostSubscription) { return URI.create(getMeasurenceApiBaseURL() + HTTP_POST_API_SUBSCRIPTION_PATH + "/" + httpPostSubscription.getPartnerId() + "/" + httpPostSubscription.getUserIdentity() + "/" + httpPostSubscription.getDeviceMacAddress()); }
From source file:co.cask.cdap.client.rest.RestClient.java
public RestClient(RestClientConnectionConfig config, HttpClientConnectionManager connectionManager) { this.config = config; this.baseUrl = URI.create(String.format("%s://%s:%d", config.isSSL() ? HTTPS_PROTOCOL : HTTP_PROTOCOL, config.getHost(), config.getPort())); this.version = config.getVersion(); this.httpClient = HttpClients.custom().setConnectionManager(connectionManager).build(); }