MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / isHttpRpcPluginPath

Method isHttpRpcPluginPath

src/tsd/RpcManager.java:226–240  ·  view source on GitHub ↗

@param uri HTTP request URI, with or without query parameters. @return true if the URI represents a request for a HttpRpcPlugin; false otherwise. Note that this method returning true says nothing about whether or not there is a HttpRpcPlugin register

(final String uri)

Source from the content-addressed store, hash-verified

224 * at the given URI, only that it's a valid RPC plugin request.
225 */
226 boolean isHttpRpcPluginPath(final String uri) {
227 if (Strings.isNullOrEmpty(uri) || uri.length() <= PLUGIN_BASE_WEBPATH.length()) {
228 return false;
229 } else {
230 // Don't consider the query portion, if any.
231 int qmark = uri.indexOf('?');
232 String path = uri;
233 if (qmark != -1) {
234 path = uri.substring(0, qmark);
235 }
236
237 final List<String> parts = WEBPATH_SPLITTER.splitToList(path);
238 return (parts.size() > 1 && parts.get(0).equals(PLUGIN_BASE_WEBPATH));
239 }
240 }
241
242 /**
243 * Load and init instances of {@link TelnetRpc}s and {@link HttpRpc}s.

Callers 3

createQueryInstanceMethod · 0.80

Calls 3

sizeMethod · 0.65
equalsMethod · 0.45
getMethod · 0.45

Tested by 2