Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7942151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:52:51+00:00 2026-06-03T23:52:51+00:00

HTTP controller (Spring) gets a requests and making a blocking call. Once the blocking

  • 0

HTTP controller (Spring) gets a requests and making a blocking call. Once the blocking call is over the controls get back to the controller.

At this point I don’t want to send a response back to the client but rather wait for another event(e.g., completion of some processing) to happen. As soon as that event happens I need a way to collect the data from the event and then return the HTTP response with this data.

HTTPController doSomething( HTTPRequest ) 
{
    makeBlockingCall();  
    waitForEventToHappen();
    collectDataFromEvent();

    return HTTPResponse(); 

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T23:52:52+00:00Added an answer on June 3, 2026 at 11:52 pm

    You wouldn’t do that from within one request, because that would probably time out eventually and until then wouldn’t provide feedback to the customer that something is happening.

    Instead, you would immediately show a page that asynchronously (probably per AJAX) polls the server to see whether the result is already available.

    So the first request will return an id that will be used in the second (AJAX) request to lookup the result.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was looking at an example at this link http://www.mkyong.com/spring-mvc/spring-mvc-form-handling-annotation-example/ Here the controller class
If i have a Controller Action that may recieve both HTTP GET and HTTP
For the controller below, why does a call to http://localhost:port/content/about not pass about as
in this tutorial of Yii framework http://www.yiiframework.com/doc/guide/1.1/en/basics.controller#action i want to put my Actions from
I have a Spring 3.0 application, with an Web Controller Method. This method normaly
I have been going through the tutorials of Spring 3 at http://www.vaannila.com/spring/spring-annotation-controller-1.html But i
Calling the ajax called URL works well without ajax eg. http://localhost/ci/controller/method/param_value . But using
Consider two methods on the controller CustomerController.cs : //URL to be http://mysite/Customer/ public ActionResult
I have a Reports controller and various reports: http://localhost/reports/main/this_month http://localhost/reports/main/last_month http://localhost/reports/main/this_year I wanted http://localhost
As of now my Java EE application controller is build using Http Serlvets for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.