Package org.openxri.resolve

Examples of org.openxri.resolve.Resolver


            {
                return FAILURE;
            }      
           
            // create and configure a resolver
            Resolver resolver = new Resolver();
           
            // populate the root with whatever trustType the user requested
            String trustParam = ";" + trustType.getParameterPair();
           
            XRD eqRoot = new XRD();
            Service eqAuthService = new Service();
            eqAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + trustParam, SEPElement.MATCH_ATTR_CONTENT, Boolean.FALSE);
            eqAuthService.addType(Tags.SERVICE_AUTH_RES);
            eqAuthService.addURI(msRootEqualsURI);
            eqRoot.addService(eqAuthService);
           
            XRD atRoot = new XRD();
            Service atAuthService = new Service();
            atAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + trustParam, SEPElement.MATCH_ATTR_CONTENT, Boolean.FALSE);
            atAuthService.addType(Tags.SERVICE_AUTH_RES);
            atAuthService.addURI(msRootAtURI);
            atRoot.addService(atAuthService);
           
            XRD bangRoot = new XRD();
            Service bangAuthService = new Service();
            bangAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + trustParam, SEPElement.MATCH_ATTR_CONTENT, Boolean.FALSE);
            bangAuthService.addType(Tags.SERVICE_AUTH_RES);
            bangAuthService.addURI(msRootBangURI);
            bangRoot.addService(bangAuthService);
           
            resolver.setAuthority("=", eqRoot);
            resolver.setAuthority("@", atRoot);
            resolver.setAuthority("!", bangRoot);
           
            // invoke the tracert
            lookup(sOutput, resolver);
           
        }
View Full Code Here


   
    // init resolver

    try {

      this.resolver = new Resolver(null);
    } catch (Exception ex) {
     
      throw new RuntimeException(ex);
    }
   
View Full Code Here

  }

 
  public void init() throws ProxyException {

    this.resolver = new Resolver();

    this.resolver.setMaxFollowRedirects(this.config.getMaxFollowRedirects());
    this.resolver.setMaxFollowRefs(this.config.getMaxFollowRefs());
    this.resolver.setMaxRequests(this.config.getMaxRequests());
    this.resolver.setMaxTotalBytes(this.config.getMaxTotalBytes());
View Full Code Here

  }


  public void init() throws ProxyException {

    this.resolver = new Resolver();

    this.resolver.setMaxFollowRedirects(this.config.getMaxFollowRedirects());
    this.resolver.setMaxFollowRefs(this.config.getMaxFollowRefs());
    this.resolver.setMaxRequests(this.config.getMaxRequests());
    this.resolver.setMaxTotalBytes(this.config.getMaxTotalBytes());
View Full Code Here

            {
                return FAILURE;
            }      
           
            // create and configure a resolver
            Resolver resolver = new Resolver();
           
            XRD eqRoot = new XRD();
            Service eqAuthService = new Service();
            eqAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none");
            eqAuthService.addType(Tags.SERVICE_AUTH_RES);
            eqAuthService.addURI(msRootEqualsURI);
            eqRoot.addService(eqAuthService);
           
            XRD atRoot = new XRD();
            Service atAuthService = new Service();
            atAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + ";trust=none");
            atAuthService.addType(Tags.SERVICE_AUTH_RES);
            atAuthService.addURI(msRootAtURI);
            atRoot.addService(atAuthService);

            resolver.setAuthority("=", eqRoot);
            resolver.setAuthority("@", atRoot);

            // invoke the tracert
            tracert(sOutput, resolver);
           
        }
View Full Code Here

    this.config = config;
  }

  public void init() throws ProxyException
  {
    resolver = new Resolver();

    resolver.setMaxFollowRedirects(config.getMaxFollowRedirects());
    resolver.setMaxFollowRefs(config.getMaxFollowRefs());
    resolver.setMaxRequests(config.getMaxRequests());
    resolver.setMaxTotalBytes(config.getMaxTotalBytes());
View Full Code Here

                }
            }      
           
           
            // create and configure a resolver
            Resolver resolver = new Resolver();
           
            // populate the root with whatever trustType the user requested
            String trustParam = ";" + trustType.getParameterPair();
           
            XRD eqRoot = new XRD();
            Service eqAuthService = new Service();
            eqAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + trustParam, SEPElement.MATCH_ATTR_CONTENT, Boolean.FALSE);
            eqAuthService.addType(Tags.SERVICE_AUTH_RES);
            eqAuthService.addURI(msRootEqualsURI);
            eqRoot.addService(eqAuthService);
           
            XRD atRoot = new XRD();
            Service atAuthService = new Service();
            atAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + trustParam, SEPElement.MATCH_ATTR_CONTENT, Boolean.FALSE);
            atAuthService.addType(Tags.SERVICE_AUTH_RES);
            atAuthService.addURI(msRootAtURI);
            atRoot.addService(atAuthService);
           
            XRD bangRoot = new XRD();
            Service bangAuthService = new Service();
            bangAuthService.addMediaType(Tags.CONTENT_TYPE_XRDS + trustParam, SEPElement.MATCH_ATTR_CONTENT, Boolean.FALSE);
            bangAuthService.addType(Tags.SERVICE_AUTH_RES);
            bangAuthService.addURI(msRootBangURI);
            bangRoot.addService(bangAuthService);
           
            resolver.setAuthority("=", eqRoot);
            resolver.setAuthority("@", atRoot);
            resolver.setAuthority("!", bangRoot);
           
            if (msRootFile != null)
            {
                setRootsFromFile(resolver, msRootFile);
            }
View Full Code Here

    this.config = config;
  }

  public void init() throws ProxyException
  {
    resolver = new Resolver();

    resolver.setMaxFollowRedirects(config.getMaxFollowRedirects());
    resolver.setMaxFollowRefs(config.getMaxFollowRefs());
    resolver.setMaxRequests(config.getMaxRequests());
    resolver.setMaxTotalBytes(config.getMaxTotalBytes());
View Full Code Here

  }


  public void init() throws ProxyException {

    this.resolver = new Resolver();

    this.resolver.setMaxFollowRedirects(this.config.getMaxFollowRedirects());
    this.resolver.setMaxFollowRefs(this.config.getMaxFollowRefs());
    this.resolver.setMaxRequests(this.config.getMaxRequests());
    this.resolver.setMaxTotalBytes(this.config.getMaxTotalBytes());
View Full Code Here

    */ /**
    * Attempts resolution of an invalid XRI.
    */
    public void testInvalidXRIResolution()
    {
        Resolver oResolver = getConfiguredResolver();

        //
        // try to resolve a invalid xri
        //
        try
        {
            String sXRI = "xri!foo";
            oResolver.resolveAuthToXRDS(sXRI, new TrustType(), true);
            assertTrue("Did not get expected PartialResolutionException", false);
        }
        catch (XRIParseException E)
        {
            // ok
View Full Code Here

TOP

Related Classes of org.openxri.resolve.Resolver

Copyright © 2018 www.massapicom. 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.