Package org.cruxframework.crux.core.server.rest.core.dispatch

Examples of org.cruxframework.crux.core.server.rest.core.dispatch.ResourceMethod


        {
          logger.error("Overloaded rest method: " + method.getDeclaringClass().getName() + "." + method.getName() + " found. It is not supported for Crux REST services.");
        }
        else
        {
          ResourceMethod invoker = new ResourceMethod(clazz, method, httpMethod);
          rootSegment.addPath(pathExpression, invoker);
          restMethodNames.add(method.getName());
          size++;
          return new RestMethodRegistrationInfo(pathExpression, invoker);
        }
View Full Code Here


    if (!isResponseMediaTypeAllowed(accepts))
    {
      throw new NotAcceptableException("No match for accept header");
    }

    ResourceMethod invoker = null;

    for (ResourceMethod rm : methods)
    {
      if (rm.getHttpMethod() != null && rm.getHttpMethod().equals(httpMethod))
      {
View Full Code Here

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

    if (matcher.matches())
    {
      // we consumed entire path string
      ResourceMethod 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));
View Full Code Here

   public ResourceMethod matchSimple(HttpRequest request, String path, int start)
   {
      UriInfo uriInfo = request.getUri();
      if (start + segment.length() == path.length()) // we've reached end of string
      {
        ResourceMethod 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

TOP

Related Classes of org.cruxframework.crux.core.server.rest.core.dispatch.ResourceMethod

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.