Package java.net

Examples of java.net.URI.toASCIIString()


     */
    public String getEscapedURI () {

        URI uri = uriBuilder.build();

        String escapedURI = uri.toASCIIString();

        return escapedURI;
    }

    /**
 
View Full Code Here


                    URI l = absoluteUriBuilder.
                            path("/").
                            replaceQuery(request.getQueryString()).build();

                    response.setStatus(307);
                    response.setHeader("Location", l.toASCIIString());
                    return;
                } else {
                    pathInfo = "/";
                    requestURL.append("/");
                    requestURI += "/";
View Full Code Here

                    URI l = UriBuilder.fromUri(request.getRequestURL().toString()).
                            path("/").
                            replaceQuery(queryString).build();

                    response.setStatus(307);
                    response.setHeader("Location", l.toASCIIString());
                    return;
                } else {
                    requestURI += "/";
                }
            }
View Full Code Here

        for (BookmarkEntity bookmarkEntity : getBookmarks()) {
            UriBuilder ub = uriInfo.getAbsolutePathBuilder();
            URI bookmarkUri = ub.
                    path(bookmarkEntity.getBookmarkEntityPK().getBmid()).
                    build();
            uriArray.put(bookmarkUri.toASCIIString());
        }
        return uriArray;
    }
   
    @POST
View Full Code Here

        for (UserEntity userEntity : getUsers()) {
            UriBuilder ub = uriInfo.getAbsolutePathBuilder();
            URI userUri = ub.
                    path(userEntity.getUserid()).
                    build();
            uriArray.put(userUri.toASCIIString());
        }
        return uriArray;
    }
}
View Full Code Here

                            final String host = uriSub.getHost();
                            final int port = uriSub.getPort();

                            if (MulticastPulseClient.isLocalAddress(host, false) && !MulticastPulseClient.isLocalAddress(server, false)) {
                                System.out.println(server + ":" + group + " - " + uriSub.toASCIIString() + " is not a local service");
                                continue;
                            }

                            System.out.print(server + ":" + group + " - " + uriSub.toASCIIString() + " is reachable: ");
View Full Code Here

                            if (MulticastPulseClient.isLocalAddress(host, false) && !MulticastPulseClient.isLocalAddress(server, false)) {
                                System.out.println(server + ":" + group + " - " + uriSub.toASCIIString() + " is not a local service");
                                continue;
                            }

                            System.out.print(server + ":" + group + " - " + uriSub.toASCIIString() + " is reachable: ");

                            boolean b = false;
                            final Socket s = new Socket();
                            try {
                                s.connect(new InetSocketAddress(host, port), st);
View Full Code Here

                                                //Ignore
                                            } finally {
                                                setLock.unlock();
                                            }
                                        } else {
                                            System.out.println("Reject service: " + serviceUri.toASCIIString() + " - Not looking for scheme: " + serviceUri.getScheme());
                                        }
                                    }
                                }
                            }
View Full Code Here

      String proxy = WebAppUtils.getProxyHostAndPort(conf);
      URI proxyUri = ProxyUriUtils.getUriFromAMUrl(proxy);
      URI result = ProxyUriUtils.getProxyUri(trackingUri, proxyUri,
          applicationAttemptId.getApplicationId());
      //We need to strip off the scheme to have it match what was there before
      return result.toASCIIString().substring(HttpConfig.getSchemePrefix().length());
    } catch (URISyntaxException e) {
      LOG.warn("Could not proxify "+trackingUriWithoutScheme,e);
      return trackingUriWithoutScheme;
    } finally {
      this.readLock.unlock();
View Full Code Here

                  .getUriFromAMUrl(appAttempt.getOriginalTrackingUrl());
      String proxy = WebAppUtils.getProxyHostAndPort(conf);
      URI proxyUri = ProxyUriUtils.getUriFromAMUrl(proxy);
      URI result = ProxyUriUtils.getProxyUri(trackingUri, proxyUri,
          appAttempt.getAppAttemptId().getApplicationId());
      url = result.toASCIIString().substring(
          HttpConfig.getSchemePrefix().length());
    } catch (URISyntaxException ex) {
      Assert.fail();
    }
    return url;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.