Package org.jboss.resteasy.specimpl

Examples of org.jboss.resteasy.specimpl.UriInfoImpl


    }

    @Test
    public void shouldGenerateHeaderLinksNormalPage() throws URISyntaxException {
        //given
        final UriInfoImpl uriInfo = getUriInfo();

        //when
        final LinkHeader linkHeader = endpoint.getLinkHeader(2, 3, uriInfo);

        final Link prev = findLinkByRel(linkHeader, "prev");
View Full Code Here


    }

    @Test
    public void shouldGenerateHeaderLinksLastPage() throws URISyntaxException {
        //given
        final UriInfoImpl uriInfo = getUriInfo();

        //when
        final LinkHeader linkHeader = endpoint.getLinkHeader(3, 3, uriInfo);

        final Link prev = findLinkByRel(linkHeader, "prev");
View Full Code Here

        return null;

    }

    private UriInfoImpl getUriInfo() throws URISyntaxException {
        return new UriInfoImpl(new URI("/"), new URI("http://localhost"), "/", "", Collections.<PathSegment>emptyList());
    }
View Full Code Here

   }

   protected Object createResource(HttpRequest request, HttpResponse response, Object locator)
   {
      UriInfoImpl uriInfo = (UriInfoImpl) request.getUri();
      Object[] args = methodInjector.injectArguments(request, response);
      try
      {
         uriInfo.pushCurrentResource(locator);
         Object subResource = method.invoke(locator, args);
         warnIfJaxRSAnnotatedFields(subResource);

         return subResource;
View Full Code Here

      return method;
   }

   public ServerResponse invoke(HttpRequest request, HttpResponse response)
   {
      UriInfoImpl uriInfo = (UriInfoImpl) request.getUri();
      try
      {
         Object target = createResource(request, response);
         return invokeOnTargetObject(request, response, target);
      }
      finally
      {
         uriInfo.popCurrentResource();
         uriInfo.popMatchedURI();
      }
   }
View Full Code Here

      }
   }

   public ServerResponse invoke(HttpRequest request, HttpResponse response, Object locator)
   {
      UriInfoImpl uriInfo = (UriInfoImpl) request.getUri();
      try
      {
         Object target = createResource(request, response, locator);
         return invokeOnTargetObject(request, response, target);
      }
      finally
      {
         uriInfo.popCurrentResource();
         uriInfo.popMatchedURI();
      }
   }
View Full Code Here

    private InstallationManagementEndpoint endpoint = new InstallationManagementEndpoint();

    @Test
    public void shouldGenerateHeaderLinksFirstPage() throws URISyntaxException {
        //given
        final UriInfoImpl uriInfo = getUriInfo();

        //when
        final LinkHeader linkHeader = endpoint.getLinkHeader(0, 3, uriInfo);

        //then
View Full Code Here

    }

    @Test
    public void shouldGenerateHeaderLinksNormalPage() throws URISyntaxException {
        //given
        final UriInfoImpl uriInfo = getUriInfo();

        //when
        final LinkHeader linkHeader = endpoint.getLinkHeader(2, 3, uriInfo);

        final Link prev = findLinkByRel(linkHeader, "prev");
View Full Code Here

    }

    @Test
    public void shouldGenerateHeaderLinksLastPage() throws URISyntaxException {
        //given
        final UriInfoImpl uriInfo = getUriInfo();

        //when
        final LinkHeader linkHeader = endpoint.getLinkHeader(3, 3, uriInfo);

        final Link prev = findLinkByRel(linkHeader, "prev");
View Full Code Here

        return null;

    }

    private UriInfoImpl getUriInfo() throws URISyntaxException {
        return new UriInfoImpl(new URI("/"), new URI("http://localhost"), "/", "", Collections.<PathSegment>emptyList());
    }
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.specimpl.UriInfoImpl

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.