Tabnine Logo
DefaultHandlerRegistry$ErrorRestHandler
Code IndexAdd Tabnine to your IDE (free)

How to use
DefaultHandlerRegistry$ErrorRestHandler
in
org.apache.shindig.protocol

Best Java code snippets using org.apache.shindig.protocol.DefaultHandlerRegistry$ErrorRestHandler (Showing top 5 results out of 315)

origin: org.gatein.shindig/shindig-common

/**
 * Get a REST request handler
 */
public RestHandler getRestHandler(String path, String method) {
 method = method.toUpperCase();
 if (path != null) {
  if (path.startsWith("/")) {
   path = path.substring(1);
  }
  String[] pathParts = StringUtils.splitPreserveAllTokens(path, '/');
  Map<String, SortedSet<RestPath>> methods = serviceMethodPathMap.get(pathParts[0]);
  if (methods != null) {
   SortedSet<RestPath> paths = methods.get(method);
   if (paths != null) {
    for (RestPath restPath : paths) {
     RestHandler handler = restPath.accept(pathParts);
     if (handler != null) {
      return handler;
     }
    }
   }
  }
 }
 return new ErrorRestHandler(new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED,
   "No service defined for path " + path));
}
origin: apache/shindig

/**
 * Get a REST request handler
 */
public RestHandler getRestHandler(String path, String method) {
 method = method.toUpperCase();
 if (path != null) {
  if (path.startsWith("/")) {
   path = path.substring(1);
  }
  String[] pathParts = StringUtils.splitPreserveAllTokens(path, '/');
  Map<String, SortedSet<RestPath>> methods = serviceMethodPathMap.get(pathParts[0]);
  if (methods != null) {
   SortedSet<RestPath> paths = methods.get(method);
   if (paths != null) {
    for (RestPath restPath : paths) {
     RestHandler handler = restPath.accept(pathParts);
     if (handler != null) {
      return handler;
     }
    }
   }
  }
 }
 return new ErrorRestHandler(new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED,
   "No service defined for path " + path));
}
origin: org.wso2.org.apache.shindig/shindig-common

/**
 * Get a REST request handler
 */
public RestHandler getRestHandler(String path, String method) {
 method = method.toUpperCase();
 if (path != null) {
  if (path.startsWith("/")) {
   path = path.substring(1);
  }
  String[] pathParts = StringUtils.splitPreserveAllTokens(path, '/');
  Map<String, SortedSet<RestPath>> methods = serviceMethodPathMap.get(pathParts[0]);
  if (methods != null) {
   SortedSet<RestPath> paths = methods.get(method);
   if (paths != null) {
    for (RestPath restPath : paths) {
     RestHandler handler = restPath.accept(pathParts);
     if (handler != null) {
      return handler;
     }
    }
   }
  }
 }
 return new ErrorRestHandler(new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED,
   "No service defined for path " + path));
}
origin: com.lmco.shindig/shindig-common

/**
 * Get a REST request handler
 */
public RestHandler getRestHandler(String path, String method) {
 method = method.toUpperCase();
 if (path != null) {
  if (path.startsWith("/")) {
   path = path.substring(1);
  }
  String[] pathParts = StringUtils.splitPreserveAllTokens(path, '/');
  Map<String, SortedSet<RestPath>> methods = serviceMethodPathMap.get(pathParts[0]);
  if (methods != null) {
   SortedSet<RestPath> paths = methods.get(method);
   if (paths != null) {
    for (RestPath restPath : paths) {
     RestHandler handler = restPath.accept(pathParts);
     if (handler != null) {
      return handler;
     }
    }
   }
  }
 }
 return new ErrorRestHandler(new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED,
   "No service defined for path " + path));
}
origin: org.apache.shindig/shindig-common

/**
 * Get a REST request handler
 */
public RestHandler getRestHandler(String path, String method) {
 method = method.toUpperCase();
 if (path != null) {
  if (path.startsWith("/")) {
   path = path.substring(1);
  }
  String[] pathParts = StringUtils.splitPreserveAllTokens(path, '/');
  Map<String, SortedSet<RestPath>> methods = serviceMethodPathMap.get(pathParts[0]);
  if (methods != null) {
   SortedSet<RestPath> paths = methods.get(method);
   if (paths != null) {
    for (RestPath restPath : paths) {
     RestHandler handler = restPath.accept(pathParts);
     if (handler != null) {
      return handler;
     }
    }
   }
  }
 }
 return new ErrorRestHandler(new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED,
   "No service defined for path " + path));
}
org.apache.shindig.protocolDefaultHandlerRegistry$ErrorRestHandler

Javadoc

Standard REST handler to wrap errors

Most used methods

  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Path (java.nio.file)
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now