Encyclopedia > Protocol (object-oriented programming)

  Article Content

Protocol (object-oriented programming)

In computer science's object-oriented programming, a protocol (Java: interface) is what or how unrelated objects use to communicate with each other. These are definitions of methods and values which the objects agree upon in order to cooperate.

The interface is a description of:

  1. the messages that are understood by the object,
  2. the arguments that these messages may be supplied with, and
  3. the types of results that these messages return.

If the objects are fully encapsulated then the protocol will describe the only way in which objects may be accessed by other objects.

See also: class, encapsulation, public interface[?], private interface[?]



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Northwest Harbor, New York

... is 3.04. In the town the population is spread out with 25.2% under the age of 18, 4.8% from 18 to 24, 27.3% from 25 to 44, 28.7% from 45 to 64, and 13.9% who are 65 years ...

 
 
 
This page was created in 36.8 ms