sealed trait Message extends Event
Basic trait to define all messages. A message is an event that is supposed to propagate through the network, and thus cross process boundaries.
This superclass defines the basic information that every message must hold. It is not possible to extend this class directly, but rather messages are defined by extending one of its four subclasses: UnicastMessage, MulticastMessage, BroadcastMessage, or Wrapper.
The choice of a parent class (among the three classes described above) depends on the nature of the message to define.
- UnicastMessage is for a message that is generated by the protocol (typically a control message) and it makes no sense for that message to have multiple destinations (e.g., a token that circulates on a logical ring).
- MulticastMessage is for a message that is generated by the protocol and may have multiple destinations.
- BroadcastMessage is for a message that is generated by the protocol and is broadcast to all neighbors of sending process.
- Wrapper is for adding information to an existing message, typically obtained from the application (or a higher-level protocol). This occurs for instance, when our protocol needs to add sequence numbers or other similar information to an existing payload message.
NB: Note that, just like other events, all instances of Message and their subclass must be immutable. It is an error to define a mutable subclass or else behavior is undetermined.
- Self Type
- Message
- Alphabetic
- By Inheritance
- Message
- Event
- Immutable
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
destinations: Set[PID]
The set of destination processes (well, their ID anyways).
The set of destination processes (well, their ID anyways).
- returns
the set of destination processes.
-
abstract
def
from: PID
The identifier of the sending process.
The identifier of the sending process. Typically initialized with
me
.- returns
the identifier of the sending process
-
abstract
def
id: MessageID
The identifier of the message.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Message, B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- def ensuring(cond: (Message) ⇒ Boolean, msg: ⇒ Any): Message
- def ensuring(cond: (Message) ⇒ Boolean): Message
- def ensuring(cond: Boolean, msg: ⇒ Any): Message
- def ensuring(cond: Boolean): Message
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- lazy val toPrettyString: String
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def →[B](y: B): (Message, B)