Methods on Objects
Methods in SIDL are virtual by default.
This means that the actual binding of a method
invocation to an actual implementation is determined
at runtime, based on the concrete type of the object.
SIDL currently defines three modifiers to methods
that change their default behavior.
- final :
Final methods are the opposite of virtual.
While they may still be inherited by child classes,
they cannot be overridden.
- static :
Static methods are sometimes called ``class methods'' because
they are part of a class, but do not depend on an object instance.
In non-OO languages, this means that the typical
first argument of an instance is removed.
In OO languages, these are mapped directly
to an Java or C++ static method.
- local : local is a keyword that relates to RMI. A
local method cannot be called on a remote
object. Any call on a local method must be an in-process call, or a
PreViolation will be thrown.
- oneway : oneway is a keyword that relates to RMI. A
oneway method can only take in arguments, no out arguments. This
allows the oneway method to be called with a oneway network message,
so the user doesn't need to wait for a response.
- nonblocking : nonblocking is a keyword that relates
to RMI. A nonblocking method is split into two methods, method_send()
and method_recv(). method_send() takes the in arguments and
immediately returns a sidl.rmi.Ticket. This Ticket can be used to
determine when the remote method returns, and get the out arguemnts.
Starting with Babel 0.11.0, all SIDL methods implicitly throw
sidl.RuntimeException. A sidl.RuntimeException can be
generated by the Babel generated glue code. For example, if the code
is making a call across the network using remote method invocation and
the network goes down, Babel's glue code would generate a
RuntimeException. In cases where the implementation throws an
unexpected exception (i.e., not one that is declared in the method's
SIDL declaration), the glue code can generate a
RuntimeException.
babel-1.4.0
users_guide Last Modified 2008-10-16
http://www.llnl.gov/CASC/components
components@llnl.gov