com.cloudera.api.v1
Interface ToolsResource


public interface ToolsResource


Method Summary
 ApiEcho echo(String message)
          Echoes the provided message back to the caller.
 ApiEcho echoError(String message)
          Throws an error containing the given input message.
 

Method Detail

echo

@Path(value="echo")
ApiEcho echo(String message)
Echoes the provided message back to the caller.

Parameters:
message - The message to echo back
Returns:
The original message

echoError

@Path(value="echoError")
ApiEcho echoError(String message)
Throws an error containing the given input message. This is what an error response looks like.
   {
     "message": "An error message",
     "causes": [ "A list of causes", "Potentially null" ]
   }
 

The message field contains a description of the error. The causes field, if not null, contains a list of causes for the error.

Note that this never returns an echoMessage. Instead, the result (and all error results) has the above structure.

Parameters:
message - The error message to echo
Returns:
Will always be an exception


Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.