All Packages Class Hierarchy This Package Previous Next Index
Interface org.jcon.core.tron.Message
- public interface Message
- extends PropMap
This interface represents a Message that travels between parts.
A Message is a special type of Datatron. It has a name (or ID) and
a PropMap. The name is for symantic understanding and routing.
The name is always required. Null values are allowed.
The implementation should have a no-arg constructor and a constructor
that sets the name.
-
getName()
- Returns the name.
-
reuse(String)
- A convenience method for Message reuse.
-
setName(String)
- Sets the Message name.
setName
public abstract void setName(String name)
- Sets the Message name. Period separators are encouraged for large
systems. Spaces are not allowed.
Note the name must not only semantically describe the Message, but
must be unique among all the other Messages in the portion of a
system the Message will be used in.
- Parameters:
- name - the name of the Message.
getName
public abstract String getName()
- Returns the name. This is used by MessageReceivers for determining
what to do, in a manner similar to method names. For speed and code
conciseness you can assume the name has been interned.
- Returns:
- the interned name.
reuse
public abstract void reuse(String name)
- A convenience method for Message reuse. It does a
setName()
and a removeAll() in a slightly faster manner
than two separate method calls. In future versions it may do more.
- Parameters:
- name - the name of the Message.
All Packages Class Hierarchy This Package Previous Next Index