Three ways to call Java (Synchronous call/callback/asynchronous invocation)

Source: Internet
Author: User

1: Synchronous Call: A blocking call that the caller waits for the other party to complete before returning, which is a one-way call
2: Callback: A bidirectional invocation pattern, that is, the callee will also invoke the interface when the interface is called;
3: Asynchronous invocation: A mechanism similar to a message or event, but it is called in the opposite direction, and the service of the interface proactively notifies the client (that is, the interface that invokes the client) when a message is received or an event occurs.

Example 2: The teacher usually after the assignment of the task can not wait and supervise the completion of the students, the teacher will often tell the students, the task to give him a call or send a message, then the students to the teacher to return the results of the process needs teacher information, this is a callback process.

Three ways to call Java (Synchronous call/callback/asynchronous invocation)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.