Examples of URI


Examples of HTTPClient.URI

  {
      System.err.println("Usage: java GetAuthInfo [-proxy_auth <username> <password>] <url>");
      System.exit(1);
  }

  URI url = new URI(args[0]);

  DefaultAuthHandler.setAuthorizationPrompter(new MyAuthPrompter(pa_name, pa_pass));
  HTTPConnection con = new HTTPConnection(url);
  HTTPResponse   rsp = con.Head(url.getPathAndQuery());

  int sts = rsp.getStatusCode();
  if (sts < 300)
      System.out.println("No authorization required to access " + url);
  else if (sts >= 400  &&  sts != 401  &&  sts != 407)
View Full Code Here

Examples of android.net.Uri

    if (i == null)
    {
      return false;
    }
   
    Uri uri = i.getData();
   
    return isCallback(uri);
  }
View Full Code Here

Examples of ch.ethz.iks.r_osgi.URI

    return URI.create(b.toString());
  }

  private void connect(final ServiceDescriptor desc)
      throws RemoteOSGiException, IOException {
    URI uri = this.getAddress(desc, false);
    // ChannelEndpointManager cem = remoteOSGiSvc.getEndpointManager(uri);
    // if (cem == null) {
    remoteOSGiSvc.connect(uri);
    // }
  }
View Full Code Here

Examples of cli.System.Uri

     */

    public String makeAbsolute(String href, String base) throws TransformerException {
        if (base == null || base.length()==0) {
            try {
                return new Uri(href).ToString();
            } catch (Exception e) {
                XPathException de = new XPathException("Invalid URI: " + e.getMessage());
                de.setErrorCode("FODC0005");
                throw de;
            }
        } else {
            try {
                //noinspection ConstantIfStatement
                if (false) throw new cli.System.UriFormatException();
                return resolver.ResolveUri(new Uri(base), href).ToString();
            } catch (cli.System.UriFormatException e) {
                XPathException de = new XPathException("Failure making absolute URI (base=" +
                        base + ", relative=" + href + "): " + e.getMessage());
                de.setErrorCode("FODC0005");
                throw de;
View Full Code Here

Examples of client.net.sf.saxon.ce.tree.util.URI

        if (expressionBaseURI == null) {
            String base = null;
            try {
                base = env.getBaseURI();
                if (base != null) {
                    expressionBaseURI = new URI(base);
                }
            } catch (URI.URISyntaxException e) {
                // perhaps escaping special characters will fix the problem

                String esc = EscapeURI.iriToUri(base).toString();
                try {
                    expressionBaseURI = new URI(esc);
                } catch (URI.URISyntaxException e2) {
                    // don't fail unless the base URI is actually needed (it usually isn't)
                    expressionBaseURI = null;
                }
View Full Code Here

Examples of com.adito.agent.client.util.URI

        agents.remove(ticketUri);
      }
    }
    if(agent == null) {
      agent = new Agent(agentConfiguration);
      URI uri = new URI(ticketUri);
      String username = uri.getUserinfo();
      String password = null;
      int idx = username.indexOf(':');
      if(idx != -1) {
        password = username.substring(idx + 1);
        username = username.substring(0, idx);
      }
      String ticket = uri.getQueryString();
      agent.init();
      boolean connected = false;
      try {
        agent.connect(uri.getHost(), uri.getPort(), uri.getScheme().equalsIgnoreCase("https"), username, password == null ? ticket : password, password != null);
        connected = true;
        agents.put(ticketUri, agent);       
      }
      finally {
        if(!connected) {
View Full Code Here

Examples of com.adito.vfs.utils.URI

    /* (non-Javadoc)
     * @see com.adito.vfs.VFSStore#createURIFromPath(java.lang.String)
     */
    public URI createURIFromPath(String path) throws IllegalArgumentException {
    try {
      URI uri = new URI(DAVUtilities.processAndEncodeURI(path, getRepository().getSession()));
      if (HTTP_SCHEME.equals(uri.getScheme()) || HTTPS_SCHEME.equals(uri.getScheme())){
        return uri;
      }
    }
    catch (MalformedURIException e) {
    }
View Full Code Here

Examples of com.arjuna.webservices.stax.URI

    {
        final String messageId = "testRequestWithoutExpiresWithCurrentContextWithoutExpires" ;
        final String coordinationType = TestUtil.COORDINATION_TYPE ;
        final Long expires = null ;
        final CoordinationContextType coordinationContext = new CoordinationContextType() ;
        coordinationContext.setCoordinationType(new URI(coordinationType)) ;
        coordinationContext.setRegistrationService(activationCoordinatorService) ;
        coordinationContext.setIdentifier(new AttributedURIType(TestUtil.PROTOCOL_IDENTIFIER)) ;
       
        executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
    }
View Full Code Here

Examples of com.dotcms.repackage.org.apache.commons.httpclient.URI

        location = HTTP_WITH_SLASH + location;
      }

      HostConfiguration hostConfig = new HostConfiguration();

      hostConfig.setHost(new URI(location));

      if (Validator.isNotNull(PROXY_HOST) && PROXY_PORT > 0) {
        hostConfig.setProxy(PROXY_HOST, PROXY_PORT);
      }
View Full Code Here

Examples of com.github.dynamicextensionsalfresco.webscripts.annotations.Uri

    final List<org.springframework.extensions.webscripts.WebScript> webScripts = new ArrayList<org.springframework.extensions.webscripts.WebScript>();
    ReflectionUtils.doWithMethods(beanType, new ReflectionUtils.MethodCallback() {

      @Override
      public void doWith(final Method method) throws IllegalArgumentException, IllegalAccessException {
        final Uri uri = AnnotationUtils.findAnnotation(method, Uri.class);
        if (uri != null) {
          final AnnotationWebScript webScript = createWebScript(beanName, webScriptAnnotation, uri,
              handlerMethods.createForUriMethod(method));
          webScripts.add(webScript);
        }
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.