Abstract. This paper begins with the comparison of the messagesending mechanism, for communication among agents, and the methodinvocation mechanism, for communication among objects. Then, we describe an extension of the method-invocation mechanism by introducing the notion of "sender" of a message, "state" of the interaction and "protocol" using the notion of "role", as it has been introduced in the powerJava extension of Java. The use of roles in communication is shown by means of an example of protocol.