Package org.jboss.resteasy.core

Examples of org.jboss.resteasy.core.ResourceInvoker


      matcher.region(start, path.length());

      if (matcher.matches())
      {
         // we consumed entire path string
         ResourceInvoker invoker = match(request.getHttpMethod(), request);
         if (invoker == null)
            throw new NotFoundException("Could not find resource for relative : " + path + " of full path: " + request.getUri().getRequestUri());
         uriInfo.pushMatchedURI(path, Encode.decode(path));
         populatePathParams(request, matcher, path);
         return invoker;
View Full Code Here


   public ResourceInvoker removePath(String path, Method method)
   {
      List<ResourceInvoker> list = bounded.get(path);
      if (list != null)
      {
         ResourceInvoker removed = null;
         for (ResourceInvoker invoker : list)
         {
            if (invoker instanceof ResourceMethod)
            {
               ResourceMethod rm = (ResourceMethod) invoker;
View Full Code Here

   public ResourceInvoker matchSimple(HttpRequest request, String path, int start)
   {
      UriInfoImpl uriInfo = (UriInfoImpl) request.getUri();
      if (start + segment.length() == path.length()) // we've reached end of string
      {
         ResourceInvoker invoker = match(request.getHttpMethod(), request);
         if (invoker == null)
            throw new NotFoundException("Could not find resource for relative : " + path + " of full path: " + request.getUri().getRequestUri());

         uriInfo.pushMatchedURI(path, Encode.decode(path));
         return invoker;
View Full Code Here

   public ResourceInvoker removePath(String path, Method method)
   {
      List<ResourceInvoker> list = bounded.get(path);
      if (list != null)
      {
         ResourceInvoker removed = null;
         for (ResourceInvoker invoker : list)
         {
            if (invoker instanceof ResourceMethod)
            {
               ResourceMethod rm = (ResourceMethod) invoker;
View Full Code Here

   public ResourceInvoker matchSimple(HttpRequest request, String path, int start)
   {
      UriInfoImpl uriInfo = (UriInfoImpl) request.getUri();
      if (start + segment.length() == path.length()) // we've reached end of string
      {
         ResourceInvoker invoker = match(request.getHttpMethod(), request.getHttpHeaders().getMediaType(), request.getHttpHeaders().getAcceptableMediaTypes());
         if (invoker == null)
            throw new NotFoundException("Could not find resource for relative : " + path + " of full path: " + request.getUri().getRequestUri());

         uriInfo.pushMatchedURI(path, Encode.decode(path));
         return invoker;
View Full Code Here

      matcher.region(start, path.length());

      if (matcher.matches())
      {
         // we consumed entire path string
         ResourceInvoker invoker = match(request.getHttpMethod(), request.getHttpHeaders().getMediaType(), request.getHttpHeaders().getAcceptableMediaTypes());
         if (invoker == null)
            throw new NotFoundException("Could not find resource for relative : " + path + " of full path: " + request.getUri().getRequestUri());
         uriInfo.pushMatchedURI(path, Encode.decode(path));
         populatePathParams(request, matcher, path);
         return invoker;
View Full Code Here

      ResourceMethodRegistry registry = new ResourceMethodRegistry(ResteasyProviderFactory
              .getInstance());
      registry.addPerRequestResource(Resource.class);
      try
      {
         ResourceInvoker invoker = registry.getResourceInvoker(MockHttpRequest.options("/resource/sub"));
      }
      catch (DefaultOptionsMethodException e)
      {
      }
      try
      {
         ResourceInvoker invoker = registry.getResourceInvoker(MockHttpRequest.put("/resource/sub"));
      }
      catch (NotAllowedException e)
      {
      }
   }
View Full Code Here

   {
      List<MethodExpression> expressions = bounded.get(path);
      if (expressions == null) return;
      for (MethodExpression expression : expressions)
      {
         ResourceInvoker invoker = expression.getInvoker();
         if (invoker.getMethod().equals(method))
         {
            expression.parent.targets.remove(expression);
            expressions.remove(expression);
            if (expressions.size() == 0) bounded.remove(path);
            size--;
View Full Code Here

         matcher.region(start, path.length());

         if (matcher.matches())
         {
            expressionMatched = true;
            ResourceInvoker invoker = expression.getInvoker();
            if (invoker instanceof ResourceLocatorInvoker)
            {
               ResteasyUriInfo uriInfo = (ResteasyUriInfo) request.getUri();
               int length = matcher.start(expression.getNumGroups() + 1);
               if (length == -1)
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.core.ResourceInvoker

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.