RAD Methods
A RAD method is a procedure call made in the context of the object it is called on. In addition to a name, a method may define a return type, can define zero or more arguments, and may declare that it returns an error, optionally with an error return type. If a method does not define a return type, it returns no value.
Each method argument has a name and a type. If a method does not declare that it returns an error, it theoretically cannot fail. However, because the connection to RAD could be broken either due to a network problem or a catastrophic failure in RAD itself, all method calls can fail with an I/O error. If a method declares that it returns an error but does not specify a type, the method may fail due to API-specific reasons. Clients will be able to distinguish this failure type from I/O failures.
Finally, if a method also defines an error return type, data of that type may be provided to the client in the case where the API-specific failure occurs.
Note:
Method names cannot be overloaded.The following are the guidelines for methods:
-
Methods provide mechanisms for examining and modifying administrative state.
-
Consider grouping together existing native APIs into aggregated RAD functions which enable higher order operations to be exposed.
-
Follow established good practice for RPC style development. RAD is primarily for remote administration, and avoiding excessive network load is good practice.