up previous next contents
Next: UML summary Up: Introduction to OO concepts Previous: Abstraction with objects   Contents

Message passing

  • Objects communicate by sending messages.
  • Messages convey some form of information.
  • An object requests another object to carry out an activity by sending it a message.
  • Most messages pass arguments back and forth.
  • Meilir Page-Jones defines three types of messages[12]:
    1. Informative - send information for the object to update itself.
    2. Interrogative - ask an object to reveal some information about itself
    3. Imperative - take some action on itself, or another object
  • Grady Booch defines four types of messages[4]:
    1. Synchronous - receiving object starts only when it receives a message from a sender, and it is ready.
    2. Balking - sending object gives up on the message if the receiving object is not ready to accept it.
    3. Timeout - sending object waits only for a certain time period for the receiving object to be ready to accept the message.
    4. Asynchronous - sender can send a message to a receiver regardless of whether the receiver is ready to receive it.


up previous next contents
Next: UML summary Up: Introduction to OO concepts Previous: Abstraction with objects   Contents