The actor reference is a new primitive type in SALSA. There are three approaches to obtain an actor reference: either by actor creation statement, the getReferenceByName() function, or passed arguments from messages. This section concentrates on actor creation and reference passing.
Writing a constructor in SALSA programming is similar to object construction in Java programming. For instance, one can declare the HelloWorld actor as follows:
// An actor reference with type HelloWorld HelloWorld myRef; |
// Assume the constructor of HelloWorld is: // public HelloWorld() {} myRef = new HelloWorld(); |